Skip to content

Commit

Permalink
Add contract test for wallet_getderivedaddress
Browse files Browse the repository at this point in the history
  • Loading branch information
FFFra committed Mar 11, 2024
1 parent 459bf16 commit fb1013c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/tests/contract_test/wallet_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,23 @@
(h/logout)
(rf-test/wait-for
[::logout/logout-method])))))

(defn get-derived-account
[response]
(is (= "0x1" (:sha3-pwd response)))
(is (= "🍌" (:emoji response)))
(is (= :army (:color response)))
(is (= "m/44'/60'/0'/0/7" (:path response)))
(is (= "Test 3" (:account-name response))))

(deftest wallet-create-derived-addresses-success
(h/log-headline :wallet/create-derived-addresses)
(rf-test/run-test-async
(h/with-app-initialized
(h/with-account
(contract-utils/call-rpc-endpoint
{:rpc-endpoint "wallet_getDerivedAccount"
:params ["0x1"
"some-account-address"
["m/44'/60'/0'/0/7"]]
:action get-derived-account})))))

0 comments on commit fb1013c

Please sign in to comment.