starknet-io / get-starknet

StarkNet wallet <-> dApp bridge
MIT License
154 stars 106 forks source link

Tests of ArgentX & Braavos experimental wallets #212

Closed PhilippeR26 closed 4 days ago

PhilippeR26 commented 5 months ago

Experimental Braavos wallet v0.0.2. Experimental ArgentX wallet v5.13.0 (06/feb/2024).

@dhruvkelawala , @avimak , @ivpavici , @amanusk

Test DAPP : https://cairo1-js-git-testbraavos002-philipper26.vercel.app/ My documentation for this new APi : https://github.com/PhilippeR26/Cairo1JS/blob/testBraavos002/doc/walletAPIspec.md

Result of the tests of the experimental wallets with PR #194 :

Id Subject ArgentX Braavos Comment
1 event accountsChanged never released. Unexpected release at each new block.
2 event networkChanged neither accountChanged nor networkChanged released OK
3 wallet_getPermissions OK OK
4 wallet_requestAccounts OK OK
5 wallet_watchAsset return false if asset already visible return true if asset already visible Braavos behavior preferred
6 wallet_addStarknetChain Works, but fail if already added. Not implemented preferable : returns true if already added
7 wallet_switchStarknetChain Works, but
if not existing : fails.
If already active : fails
Not implemented Preferable: if not existing : returns false. If active : returns true
8 wallet_requestChainId OK OK
9 starknet_addInvokeTransaction OK OK
10 starknet_addDeclareTransaction Impossible to proceed. In AddDeclareTransactionParameters type, abi key is optional, but call returns Error: Missing ABI. Abi type expected is string, but in reality is an array of object. How to process? What's the format and values of contract_class_version parameter? Decline button is not generating any response. Wallet window opened, but do not proceed. One example of a valid request seems necessary.
11 starknet_addDeployAccountTransaction FAIL, with message Error: Not implemented. OK.
But do not deploy at the pre-calculated address
Braavos uses the current account to fund automatically the account deployment.
12 starknet_signTypedData Improved display (nice!), but not processing after click on sign OK.
Raw format display
tested with legacy V5 format
13 starknet_supportedSpecs OK OK
14 GetDeploymentDataResult - - What is it? How does it work?
dhruvkelawala commented 5 months ago
dhruvkelawala commented 5 months ago

Also we should consider error cases for watchAsset, switchChainId and addChainId. For example, if the user rejects the requests. Returning false might not exactly give the right information to the dapp