|
1 | 1 | import { describe, test } from 'node:test'; |
2 | 2 | import { AccountLayout } from '@solana/spl-token'; |
3 | | -import { Transaction } from '@solana/web3.js'; |
| 3 | +import { PublicKey, Transaction } from '@solana/web3.js'; |
4 | 4 | import { assert } from 'chai'; |
5 | 5 | import { start } from 'solana-bankrun'; |
6 | 6 | import * as borsh from 'borsh'; |
@@ -64,9 +64,9 @@ describe('Escrow!', async () => { |
64 | 64 | const vaultTokenAccount = AccountLayout.decode(vaultInfo.data); |
65 | 65 |
|
66 | 66 | assert(offer.id.toString() === values.id.toString(), 'wrong id'); |
67 | | - assert(offer.maker.toBase58() === values.maker.publicKey.toBase58(), 'maker key does not match'); |
68 | | - assert(offer.token_mint_a.toBase58() === values.mintAKeypair.publicKey.toBase58(), 'wrong mint A'); |
69 | | - assert(offer.token_mint_b.toBase58() === values.mintBKeypair.publicKey.toBase58(), 'wrong mint B'); |
| 67 | + assert(new PublicKey(offer.maker).toBase58() === values.maker.publicKey.toBase58(), 'maker key does not match'); |
| 68 | + assert(new PublicKey(offer.token_mint_a).toBase58() === values.mintAKeypair.publicKey.toBase58(), 'wrong mint A'); |
| 69 | + assert(new PublicKey(offer.token_mint_b).toBase58() === values.mintBKeypair.publicKey.toBase58(), 'wrong mint B'); |
70 | 70 | assert(offer.token_b_wanted_amount.toString() === values.amountB.toString(), 'unexpected amount B'); |
71 | 71 | assert(vaultTokenAccount.amount.toString() === values.amountA.toString(), 'unexpected amount A'); |
72 | 72 | }); |
|
0 commit comments