walletconnect-dart-sdk
walletconnect-dart-sdk copied to clipboard
Changes type of chainId to String
Fixes #15
Thanks for the PR @josh-burton Do you have an idea which blockchain uses a string as chainId? The official monorepo uses a number: private _chainId = 0;
@RootSoft this was the Elrond chain using the Maiar wallet.
Hi! Please add this, we want to add Solana provider but it' a String chaindId:
- Solana Mainnet = 'solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ',
- Solana Devnet = 'solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K',
@ChikinDeveloper @josh-burton would dynamic
be preferred over String
?
Can you guys try out this branch: https://github.com/RootSoft/walletconnect-dart-sdk/tree/feature/dynamic-chainid
walletconnect_dart:
git:
url: git://github.com/RootSoft/walletconnect-dart-sdk.git
ref: feature/dynamic-chainid
A solana integration provider would be helpful as well: https://github.com/RootSoft/walletconnect-dart-sdk/blob/master/lib/src/providers/ethereum_walletconnect_provider.dart
@ChikinDeveloper @josh-burton would
dynamic
be preferred overString
?
I don't think we need dynamic. It won't be a bool or a list or a complex object, it will really only be either a string or an int.
In that case casting the int to a string is the best option.
@josh-burton Can you try out the following branch: https://github.com/RootSoft/walletconnect-dart-sdk/tree/feature/string-chainid
walletconnect_dart:
git:
url: git://github.com/RootSoft/walletconnect-dart-sdk.git
ref: feature/string-chainid
This branch contains the chain id as a string. Some wallets sends the chainId
as int, others as a String. So I had to do some extra checks to cast the chainId to a String.