WalletConnect / WalletConnectModalFlutter

The WalletConnectModal for WalletConnect built using Flutter.
https://pub.dev/packages/walletconnect_modal_flutter
Apache License 2.0
20 stars 18 forks source link

Tron support #16

Open KabaDH opened 1 year ago

KabaDH commented 1 year ago

Hello! Thanks for the amazing package. Does it support tron network?

Everything works fine until I try to sign the transaction.

Connection Sign
Luzzotica commented 1 year ago

WalletConnect V2 is chain agnostic, so it does support tron, are you sure tron_sign is the method you should use?

I don't know much about Tron.

If you do some sleuthing in their packages, you could likely figure out how to send the request successfully: https://github.com/tronprotocol/tronwallet-adapter/tree/main

KabaDH commented 1 year ago

WalletConnect V2 is chain agnostic, so it does support tron, are you sure tron_sign is the method you should use?

I don't know much about Tron.

If you do some sleuthing in their packages, you could likely figure out how to send the request successfully: https://github.com/tronprotocol/tronwallet-adapter/tree/main

Its a pity, but tronwallet-adapter contains references to build-in method wallet.signTransaction({ transaction }) only. I could not find working example about making and signing transaction on wallet connect v2 while using dart.

When we initialize WalletConnectModalService it accepts any method. Neither "tron_signTransaction" nor "tron_sign" does not work with request. This method does not return any error. Does it use correct params or method name? I don't know.

final res = await _service.web3App?.signEngine.request( topic: topic, chainId: _chainId, request: SessionRequestParams( method: 'tron_sign', params: json.encode(trx), ), );