Skip to content

Commit

Permalink
Merge pull request #2 from polkawallet-io/develop
Browse files Browse the repository at this point in the history
update node list & network icon
  • Loading branch information
RomeroYang authored Jul 4, 2023
2 parents 8ae2881 + e5553d1 commit 49c7d5c
Show file tree
Hide file tree
Showing 10 changed files with 567 additions and 247 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.5.4] - 20230704.

* bump polkawallet_sdk: 0.5.4+2.
* rename statemine/statemint -> asset hub.

## [0.4.9] - 20220808.

* bump polkawallet_sdk: 0.4.9.
Expand Down
22 changes: 22 additions & 0 deletions assets/images/asset_hub.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/statemine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 60 additions & 15 deletions lib/common/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,49 @@ const network_name_karura = 'karura';
const plugin_node_list = {
network_name_statemine: [
{
'name': 'Statemine (hosted by Parity)',
'name': 'via Dwellir',
'ss58': 2,
'endpoint': 'wss://kusama-statemine-rpc.paritytech.net',
'endpoint': 'wss://statemine-rpc.dwellir.com',
},
{
'name': 'via Dwellir Tunisia',
'ss58': 2,
'endpoint': 'wss://statemine-rpc-tn.dwellir.com',
},
{
'name': 'via IBP-GeoDNS1',
'ss58': 2,
'endpoint': 'wss://sys.ibp.network/statemine',
},
{
'name': 'via IBP-GeoDNS2',
'ss58': 2,
'endpoint': 'wss://sys.dotters.network/statemine',
},
{
'name': 'via LuckyFriday',
'ss58': 2,
'endpoint': 'wss://rpc-statemine.luckyfriday.io',
},
{
'name': 'Statemine (hosted by onfinality)',
'name': 'via OnFinality',
'ss58': 2,
'endpoint': 'wss://statemine.api.onfinality.io/public-ws',
},
{
'name': 'Statemine (hosted by dwellir)',
'name': 'via Parity',
'ss58': 2,
'endpoint': 'wss://statemine-rpc.dwellir.com',
'endpoint': 'wss://kusama-asset-hub-rpc.polkadot.io',
},
{
'name': 'Statemine (hosted by pinknode)',
'name': 'via RadiumBlock',
'ss58': 2,
'endpoint': 'wss://public-rpc.pinknode.io/statem',
'endpoint': 'wss://statemine.public.curie.radiumblock.co/ws',
},
{
'name': 'via Stakeworld',
'ss58': 2,
'endpoint': 'wss://ksm-rpc.stakeworld.io/assethub',
},
// {
// 'name': 'Westmint (hosted by Parity)',
Expand All @@ -40,24 +65,44 @@ const plugin_node_list = {
],
network_name_statemint: [
{
'name': 'Statemint (hosted by Parity)',
'name': 'via Dwellir',
'ss58': 0,
'endpoint': 'wss://statemint-rpc.polkadot.io',
'endpoint': 'wss://statemint-rpc.dwellir.com',
},
{
'name': 'Statemint (hosted by onfinality)',
'name': 'via Dwellir Tunisia',
'ss58': 0,
'endpoint': 'wss://statemint.api.onfinality.io/publi',
'endpoint': 'wss://statemint-rpc-tn.dwellir.com',
},
{
'name': 'Statemint (hosted by dwellir)',
'name': 'via IBP-GeoDNS1',
'ss58': 0,
'endpoint': 'wss://statemint-rpc.dwellir.com',
'endpoint': 'wss://sys.ibp.network/statemint',
},
{
'name': 'via IBP-GeoDNS2',
'ss58': 0,
'endpoint': 'wss://sys.dotters.network/statemint',
},
{
'name': 'via OnFinality',
'ss58': 0,
'endpoint': 'wss://statemint.api.onfinality.io/public-ws',
},
{
'name': 'via Parity',
'ss58': 0,
'endpoint': 'wss://polkadot-asset-hub-rpc.polkadot.io',
},
{
'name': 'via RadiumBlock',
'ss58': 0,
'endpoint': 'wss://statemint.public.curie.radiumblock.co/ws',
},
{
'name': 'Statemint (hosted by pinknode)',
'name': 'via Stakeworld',
'ss58': 0,
'endpoint': 'wss://public-rpc.pinknode.io/statemi',
'endpoint': 'wss://dot-rpc.stakeworld.io/assethub',
},
],
};
Expand Down
3 changes: 2 additions & 1 deletion lib/pages/defi/karuraEntryPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class KaruraEntryPage extends StatelessWidget {

void _goToKar(BuildContext context, String module) {
Navigator.popUntil(context, ModalRoute.withName('/'));
final network = plugin.basic.name == 'statemine' ? 'karura' : 'acala';
final network =
plugin.basic.name == network_name_statemine ? 'karura' : 'acala';
switch (module) {
case 'loan':
plugin.appUtils.switchNetwork(
Expand Down
4 changes: 2 additions & 2 deletions lib/polkawallet_plugin_statemine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import 'package:polkawallet_ui/utils/format.dart';
class PluginStatemine extends PolkawalletPlugin {
/// the kusama plugin support two networks: kusama & polkadot,
/// so we need to identify the active network to connect & display UI.
PluginStatemine({name = 'statemine'})
: tokenIcons = name == 'statemine'
PluginStatemine({name = network_name_statemine})
: tokenIcons = name == network_name_statemine
? {
'KSM': Image.asset(
'packages/polkawallet_plugin_statemine/assets/images/tokens/KSM.png'),
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/i18n/en/common.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Map<String, String> enCommon = {
'assets': 'Assets',
'assets.brief': 'Tokens issued on the Statemine network.',
'assets.brief.statemint': 'Tokens issued on the Statemint network.',
'assets.brief': 'Tokens issued on the Kusama Asset Hub.',
'assets.brief.statemint': 'Tokens issued on the Asset Hub.',
'assets.filter': 'Filter by name/symbol/ID',
'transfer': 'Transfer',
'receive': 'Receive',
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/i18n/zh/common.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Map<String, String> zhCommon = {
'assets': '资产',
'assets.brief': 'Statemine 网络上发行的 Token.',
'assets.brief.statemint': 'Statemint 网络上发行的 Token.',
'assets.brief': 'KusamaAssetHub 网络上发行的 Token.',
'assets.brief.statemint': 'AssetHub 网络上发行的 Token.',
'assets.filter': '查询名称/简称/ID',
'transfer': '转账',
'receive': '收款',
Expand Down
Loading

0 comments on commit 49c7d5c

Please sign in to comment.