Skip to content

Commit

Permalink
Updating Wallet model usage
Browse files Browse the repository at this point in the history
  • Loading branch information
erdimaden committed May 20, 2024
1 parent 5dee198 commit ce39bc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/coinbase/user.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { User as UserModel } from "./../client/api";
import { Coinbase } from "./coinbase";
import { Wallet } from "./wallet";

/**
Expand Down
4 changes: 2 additions & 2 deletions src/coinbase/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class Wallet {
* Instead, use User.createWallet.
*
* @constructs Wallet
* @throws {ArgumentError} If the model or client is not provided.
* @throws {InternalError} - If address derivation or caching fails.
* @throws {APIError} - If the request fails.
* @returns A promise that resolves with the new Wallet object.
Expand All @@ -52,7 +53,7 @@ export class Wallet {
},
});

const wallet = await Wallet.init(walletData.data!);
const wallet = await Wallet.init(walletData.data);

await wallet.createAddress();
await wallet.reload();
Expand Down Expand Up @@ -80,7 +81,6 @@ export class Wallet {
if (!model) {
throw new ArgumentError("Wallet model cannot be empty");
}

if (!seed) {
seed = bip39.generateMnemonic();
}
Expand Down

0 comments on commit ce39bc7

Please sign in to comment.