Skip to content

Commit 2e5ff3e

Browse files
Release v0.4.0 (coinbase#225)
* Remove yarn.lock file since we use npm to build (coinbase#218) * Update getDefaultAddress and getAddress to fetch addresses if not loaded (coinbase#217) * Bump package to 0.4.0 to prepare for release (coinbase#224) --------- Co-authored-by: Howard Xie <howard.xie@coinbase.com> Co-authored-by: cb-howardatcb <86798563+howard-at-cb@users.noreply.github.com>
1 parent d303847 commit 2e5ff3e

File tree

19 files changed

+451
-3869
lines changed

19 files changed

+451
-3869
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Unreleased
44

5+
## [0.4.0] - 2024-09-06
6+
7+
### Changed
8+
- `getDefaultAddress` wallet method updated to return a promise, and `getAddress` wallet methods now return a promise and `WalletAddress` instead of `Address`. Both functions will now fetch addresses for the wallet if they haven't been loaded.
9+
510
## [0.3.0] - 2024-09-05
611

712
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Next, view the default Address of your Wallet. You will need this default Addres
131131

132132
```typescript
133133
// A Wallet has a default Address.
134-
const address = wallet.getDefaultAddress();
134+
const address = await wallet.getDefaultAddress();
135135
console.log(`Address: ${address}`);
136136
```
137137

jest.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ module.exports = {
1010
maxWorkers: 1,
1111
coverageThreshold: {
1212
"./src/coinbase/**": {
13-
branches: 80,
13+
branches: 78,
1414
functions: 90,
1515
statements: 85,
16-
lines: 90,
16+
lines: 88,
1717
},
1818
},
1919
};

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "ISC",
55
"description": "Coinbase Platform SDK",
66
"repository": "https://github.com/coinbase/coinbase-sdk-nodejs",
7-
"version": "0.3.0",
7+
"version": "0.4.0",
88
"main": "dist/index.js",
99
"types": "dist/index.d.ts",
1010
"scripts": {

quickstart-template/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let wallet = await Wallet.create();
88
console.log(`Wallet successfully created: `, wallet.toString());
99

1010
// Wallets come with a single default Address, accessible via getDefaultAddress:
11-
let address = wallet.getDefaultAddress();
11+
let address = await wallet.getDefaultAddress();
1212
console.log(`Default address for the wallet: `, address.toString());
1313

1414
const faucetTransaction = await wallet.faucet();

quickstart-template/mass-payout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function createReceivingWallets() {
1313
let receivingWallet = await Wallet.create();
1414
console.log(`Receiving Wallet${i} successfully created: `, receivingWallet.toString());
1515

16-
let receivingAddress = receivingWallet.getDefaultAddress();
16+
let receivingAddress = await receivingWallet.getDefaultAddress();
1717
console.log(`Default address for Wallet${i}: `, receivingAddress.getId());
1818
addresses.push([receivingAddress.getId()]); // Storing Address as an array.
1919
}
@@ -41,7 +41,7 @@ async function createAndFundSendingWallet() {
4141
console.log(`sendingWallet successfully created: `, sendingWallet.toString());
4242

4343
// Get sending Wallet Address.
44-
let sendingAddress = sendingWallet.getDefaultAddress();
44+
let sendingAddress = await sendingWallet.getDefaultAddress();
4545
console.log(`Default address for sendingWallet: `, sendingAddress.toString());
4646

4747
// Fund sending Wallet.

quickstart-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"license": "ISC",
1515
"type": "module",
1616
"dependencies": {
17-
"@coinbase/coinbase-sdk": "^0.3.0",
17+
"@coinbase/coinbase-sdk": "^0.4.0",
1818
"csv-parse": "^5.5.6",
1919
"csv-writer": "^1.6.0"
2020
}

0 commit comments

Comments
 (0)