Closed rohan-agarwal-coinbase closed 2 months ago
Requirement | Status | More Info | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reviews |
🟡
0/1
|
Denominator calculation
|
Since this is a breaking change, we will need to update README.md examples, the quickstarts in ./quickstart-template
, and CDP docs
Since this is a breaking change, we will need to update README.md examples, the quickstarts in
./quickstart-template
, and CDP docs
thanks @John-peterson-coinbase i updated the PR:
getDefaultAddress
Will update the CDP docs next
What changed? Why?
Updates
getDefaultAddress
andgetAddress
to fetchaddresses
if it is not loaded/cached, which occurs right when creating a new wallet.This PR tightens the interfaces for both functions.
getDefaultAddress
no longer returns undefined and throws an error.getAddress
now returns aPromise<WalletAddress>
instead ofAddress
since it callslistAddresses
. This is backward-incompatibleTesting
Updated unit tests. I also wrote and ran a test script locally that succeeds to get the default address after fetching a wallet, which was earlier failing.
Qualified Impact
Getting addresses has changed with new side effects, and the interfaces have changed in an backward-incompatible way so fixing issues would require client-side changes.