Skip to content

Commit 2861933

Browse files
committed
fix: mock getAccount
Signed-off-by: Norman <[email protected]>
1 parent 984615f commit 2861933

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/adena-module/src/wallet/wallet-sign.spec.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { JSONRPCProvider, Provider } from '@gnolang/tm2-js-client';
1+
import { ABCIAccount, JSONRPCProvider, Provider } from '@gnolang/tm2-js-client';
22
import { AdenaWallet, Document, txToDocument } from './..';
33

44
const mnemonic =
@@ -54,6 +54,16 @@ describe('Transaction Sign', () => {
5454
});
5555
mockProvider.getAccountNumber = jest.fn().mockResolvedValue('0');
5656
mockProvider.getAccountSequence = jest.fn().mockResolvedValue('1');
57+
const mockAccount: ABCIAccount = {
58+
BaseAccount: {
59+
address: '',
60+
coins: '',
61+
public_key: null,
62+
account_number: '',
63+
sequence: ''
64+
}
65+
}
66+
mockProvider.getAccount = jest.fn().mockResolvedValue(mockAccount);
5767
});
5868

5969
it('default success', async () => {

0 commit comments

Comments
 (0)