Skip to content

Commit

Permalink
update tests to conform with changes on wallet getMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf committed Feb 10, 2023
1 parent a48ceef commit 907fbc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/fuel-gauge/src/coverage-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ describe('Coverage Contract', () => {
},
];

const aMessages = await WALLET_A.getMessages();
const bMessages = await WALLET_B.getMessages();
const { messages: aMessages } = await WALLET_A.getMessages();
const { messages: bMessages } = await WALLET_B.getMessages();

expect(aMessages).toStrictEqual(EXPECTED_MESSAGES_A);
expect(bMessages).toStrictEqual(EXPECTED_MESSAGES_B);
Expand All @@ -428,7 +428,7 @@ describe('Coverage Contract', () => {
request.addMessages([message]);
const response = await sender.sendTransaction(request);
await response.waitForResult();
const receiverMessages = await receiver.getMessages();
const { messages: receiverMessages } = await receiver.getMessages();

expect(receiverMessages[0].amount).toEqual(message.amount);
expect(receiverMessages[0].sender).toEqual(message.sender);
Expand Down Expand Up @@ -478,7 +478,7 @@ describe('Coverage Contract', () => {
const response = await sender.sendTransaction(request);

await response.wait();
const receiverMessages = await receiver.getMessages();
const { messages: receiverMessages } = await receiver.getMessages();

// sort by nonce, messages are not guaranteed in order
receiverMessages.sort((a, b) => a.nonce.toNumber() - b.nonce.toNumber());
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/src/wallet-locked.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('WalletLocked', () => {
const walletLocked = Wallet.fromAddress(
'0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba'
);
const messages = await walletLocked.getMessages();
const { messages } = await walletLocked.getMessages();
expect(messages.length).toEqual(1);
});

Expand Down

0 comments on commit 907fbc5

Please sign in to comment.