Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
findolor committed Feb 16, 2025
1 parent 9ea2f1b commit c2aef93
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions packages/orderbook/test/js_api/gui.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1144,44 +1144,6 @@ ${dotrainWithoutVaultIds}`;
assert.equal(missingFieldValues[0], 'Test binding');
});

it('should throw error if deposit value not set', async () => {
await mockServer
.forPost('/rpc-url')
.once()
.withBodyIncluding('0x82ad56cb')
.thenSendJsonRpcResult(
'0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000007546f6b656e203100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000025431000000000000000000000000000000000000000000000000000000000000'
);
await mockServer
.forPost('/rpc-url')
.once()
.withBodyIncluding('0x82ad56cb')
.thenSendJsonRpcResult(
'0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000754656b656e203200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000025432000000000000000000000000000000000000000000000000000000000000'
);

let testDotrain = `${guiConfig2}
${dotrainWithoutVaultIds}`;
let gui = await DotrainOrderGui.chooseDeployment(testDotrain, 'other-deployment');

await expect(
async () =>
await gui.generateApprovalCalldatas('0x1234567890abcdef1234567890abcdef12345678')
).rejects.toThrow('Missing deposit with token: T1');
await expect(async () => await gui.generateDepositCalldatas()).rejects.toThrow(
'Missing deposit with token: T1'
);
await expect(async () => await gui.generateDepositAndAddOrderCalldatas()).rejects.toThrow(
'Missing deposit with token: T1'
);

let missingDeposits = gui.getMissingDeposits();
assert.equal(missingDeposits.length, 2);
assert.equal(missingDeposits[0], 'token1');
assert.equal(missingDeposits[1], 'token2');
});

it('should set vault ids', async () => {
mockServer
.forPost('/rpc-url')
Expand Down

0 comments on commit c2aef93

Please sign in to comment.