From 459d97ee1ad0d2e1e8d476f9ad1f6d466e418e9d Mon Sep 17 00:00:00 2001 From: Erdi Maden Date: Wed, 22 May 2024 23:02:41 -0500 Subject: [PATCH] updating test description and method name --- src/coinbase/tests/wallet_test.ts | 12 ++++++------ src/coinbase/wallet.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/coinbase/tests/wallet_test.ts b/src/coinbase/tests/wallet_test.ts index 447c8354..c17d602a 100644 --- a/src/coinbase/tests/wallet_test.ts +++ b/src/coinbase/tests/wallet_test.ts @@ -147,7 +147,7 @@ describe("Wallet Class", () => { }); }); - describe(".export", () => { + describe("#export", () => { let walletId: string; let addressModel: AddressModel; let walletModel: WalletModel; @@ -185,7 +185,7 @@ describe("Wallet Class", () => { }); }); - describe(".defaultAddress", () => { + describe("#defaultAddress", () => { let wallet, walletId; beforeEach(async () => { jest.clearAllMocks(); @@ -224,7 +224,7 @@ describe("Wallet Class", () => { }); }); - describe(".listBalances", () => { + describe("#getBalances", () => { beforeEach(() => { const mockBalanceResponse: AddressBalanceList = { data: [ @@ -253,7 +253,7 @@ describe("Wallet Class", () => { }); it("should return a hash with an ETH and USDC balance", async () => { - const balanceMap = await wallet.listBalances(); + const balanceMap = await wallet.getBalances(); expect(balanceMap.get("eth")).toEqual(new Decimal(1)); expect(balanceMap.get("usdc")).toEqual(new Decimal(5)); expect(Coinbase.apiClients.wallet!.listWalletBalances).toHaveBeenCalledTimes(1); @@ -261,7 +261,7 @@ describe("Wallet Class", () => { }); }); - describe(".getBalance", () => { + describe("#getBalance", () => { beforeEach(() => { const mockWalletBalance: BalanceModel = { amount: "5000000000000000000", @@ -316,7 +316,7 @@ describe("Wallet Class", () => { }); }); - describe(".canSign", () => { + describe("#canSign", () => { let wallet; beforeAll(async () => { const mockAddressModel = newAddressModel(walletId); diff --git a/src/coinbase/wallet.ts b/src/coinbase/wallet.ts index 8d4a23c5..fa74fb19 100644 --- a/src/coinbase/wallet.ts +++ b/src/coinbase/wallet.ts @@ -227,7 +227,7 @@ export class Wallet { * * @returns The list of balances. The key is the Asset ID, and the value is the balance. */ - public async listBalances(): Promise { + public async getBalances(): Promise { const response = await Coinbase.apiClients.wallet!.listWalletBalances(this.model.id!); return BalanceMap.fromBalances(response.data.data); }