Skip to content

Commit

Permalink
support OUS of acala mandala PC1
Browse files Browse the repository at this point in the history
  • Loading branch information
RomeroYang committed Aug 28, 2020
1 parent 552fa1d commit 66e2814
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 13 deletions.
6 changes: 3 additions & 3 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = WQ5H736A22;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -518,7 +518,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = WQ5H736A22;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -548,7 +548,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = WQ5H736A22;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand Down
2 changes: 1 addition & 1 deletion lib/common/consts/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const String cross_chain_transfer_address_laminar =
'5CLaminarAUSDCrossChainTransferxxxxxxxxxxxxxwisu';

/// app versions
const String app_beta_version = '0.9.8-beta.3';
const String app_beta_version = '0.9.8-beta.4';

/// js code versions
const Map<String, int> js_code_version_map = {
Expand Down
24 changes: 24 additions & 0 deletions lib/js_service_acala/src/constants/networkSpect.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ export const EthereumNetworkKeys = Object.freeze({

// genesisHash is used as Network key for Substrate networks
export const SubstrateNetworkKeys = Object.freeze({
ACALA_PC1:
"0xc963328a9ce0911b4e6531c60aafda597b05dc4e25bf10d71e9591a0313f5388",
ACALA_TC4:
"0x783c78945a4e4a3118190bcf93002bb2d2903192bed10040eb52d54500aade36",
LAMINAR_TC1:
"0x51e943649f914229fbfaf3d03d8423bd14c58dbc51da7eff9274c0b401f08675",
CENTRIFUGE:
"0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5", // https://portal.chain.centrifuge.io/#/explorer/query/0
CENTRIFUGE_AMBER:
Expand Down Expand Up @@ -82,6 +86,16 @@ const unknownNetworkBase = {
};

const substrateNetworkBase = {
[SubstrateNetworkKeys.ACALA_PC1]: {
color: "#173DC9",
decimals: 18,
genesisHash: SubstrateNetworkKeys.ACALA_PC1,
order: 42,
pathId: "acala_mandala_pc1",
prefix: 42,
title: "Acala Mandala PC1",
unit: "ACA",
},
[SubstrateNetworkKeys.ACALA_TC4]: {
color: "#173DC9",
decimals: 18,
Expand All @@ -92,6 +106,16 @@ const substrateNetworkBase = {
title: "Acala Mandala TC4",
unit: "ACA",
},
[SubstrateNetworkKeys.LAMINAR_TC1]: {
color: "#173DC9",
decimals: 18,
genesisHash: SubstrateNetworkKeys.LAMINAR_TC1,
order: 42,
pathId: "laminar_turbulence_tc1",
prefix: 42,
title: "Laminar TC1",
unit: "LAMI",
},
[SubstrateNetworkKeys.CENTRIFUGE]: {
color: "#FCC367",
decimals: 18,
Expand Down
24 changes: 24 additions & 0 deletions lib/js_service_kusama/src/constants/networkSpect.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ export const EthereumNetworkKeys = Object.freeze({

// genesisHash is used as Network key for Substrate networks
export const SubstrateNetworkKeys = Object.freeze({
ACALA_PC1:
"0xc963328a9ce0911b4e6531c60aafda597b05dc4e25bf10d71e9591a0313f5388",
ACALA_TC4:
"0x783c78945a4e4a3118190bcf93002bb2d2903192bed10040eb52d54500aade36",
LAMINAR_TC1:
"0x51e943649f914229fbfaf3d03d8423bd14c58dbc51da7eff9274c0b401f08675",
CENTRIFUGE:
"0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5", // https://portal.chain.centrifuge.io/#/explorer/query/0
CENTRIFUGE_AMBER:
Expand Down Expand Up @@ -82,6 +86,16 @@ const unknownNetworkBase = {
};

const substrateNetworkBase = {
[SubstrateNetworkKeys.ACALA_PC1]: {
color: "#173DC9",
decimals: 18,
genesisHash: SubstrateNetworkKeys.ACALA_PC1,
order: 42,
pathId: "acala_mandala_pc1",
prefix: 42,
title: "Acala Mandala PC1",
unit: "ACA",
},
[SubstrateNetworkKeys.ACALA_TC4]: {
color: "#173DC9",
decimals: 18,
Expand All @@ -92,6 +106,16 @@ const substrateNetworkBase = {
title: "Acala Mandala TC4",
unit: "ACA",
},
[SubstrateNetworkKeys.LAMINAR_TC1]: {
color: "#173DC9",
decimals: 18,
genesisHash: SubstrateNetworkKeys.LAMINAR_TC1,
order: 42,
pathId: "laminar_turbulence_tc1",
prefix: 42,
title: "Laminar TC1",
unit: "LAMI",
},
[SubstrateNetworkKeys.CENTRIFUGE]: {
color: "#FCC367",
decimals: 18,
Expand Down
12 changes: 12 additions & 0 deletions lib/js_service_laminar/src/constants/networkSpect.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export const EthereumNetworkKeys = Object.freeze({

// genesisHash is used as Network key for Substrate networks
export const SubstrateNetworkKeys = Object.freeze({
ACALA_PC1:
"0xc963328a9ce0911b4e6531c60aafda597b05dc4e25bf10d71e9591a0313f5388",
ACALA_TC4:
"0x783c78945a4e4a3118190bcf93002bb2d2903192bed10040eb52d54500aade36",
LAMINAR_TC1:
Expand Down Expand Up @@ -84,6 +86,16 @@ const unknownNetworkBase = {
};

const substrateNetworkBase = {
[SubstrateNetworkKeys.ACALA_PC1]: {
color: "#173DC9",
decimals: 18,
genesisHash: SubstrateNetworkKeys.ACALA_PC1,
order: 42,
pathId: "acala_mandala_pc1",
prefix: 42,
title: "Acala Mandala PC1",
unit: "ACA",
},
[SubstrateNetworkKeys.ACALA_TC4]: {
color: "#173DC9",
decimals: 18,
Expand Down
18 changes: 10 additions & 8 deletions lib/page/staking/validators/overview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class _StakingOverviewPageState extends State<StakingOverviewPage>
}

Widget _buildNominatingList() {
final dic = I18n.of(context).staking;
bool hasData = store.staking.ledger['stakingLedger'] != null;
if (!hasData) {
return Container();
Expand Down Expand Up @@ -222,10 +223,10 @@ class _StakingOverviewPageState extends State<StakingOverviewPage>
child: ListTile(
dense: true,
leading: AddressIcon(validator.accountId, size: 32),
title: Text(meStaked != null
? '${Fmt.token(meStaked, decimals)} $symbol'
: I18n.of(context).staking['nominate.inactive']),
subtitle: Fmt.accountDisplayName(validator.accountId, accInfo),
title: Fmt.accountDisplayName(validator.accountId, accInfo),
subtitle: Text(meStaked != null
? '${dic['nominate.active']} ${Fmt.token(meStaked, decimals)} $symbol'
: dic['nominate.inactive']),
trailing: Container(
width: 100,
child: Column(
Expand Down Expand Up @@ -258,10 +259,11 @@ class _StakingOverviewPageState extends State<StakingOverviewPage>
list.addAll(waiting.map((id) {
return Expanded(
child: ListTile(
dense: true,
leading: AddressIcon(id, size: 32),
title: Text(I18n.of(context).staking['nominate.waiting']),
subtitle: Text(Fmt.address(id, pad: 6))),
dense: true,
leading: AddressIcon(id, size: 32),
title: Text(Fmt.address(id, pad: 6)),
subtitle: Text(dic['nominate.waiting']),
),
);
}).toList());
return Container(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: PolkaWallet made with Flutter.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.9.8+983
version: 0.9.8+984

environment:
sdk: ">=2.1.0 <3.0.0"
Expand Down

0 comments on commit 66e2814

Please sign in to comment.