|
1 | 1 | import { expect, expectDeepEqual } from './setup.js';
|
2 | 2 | import { mnemonicToAccount } from 'viem/accounts';
|
3 | 3 | import { generateMnemonic } from '../src/utils/wallet.js';
|
4 |
| -import { randomSalt, supplierId as spId } from '../src/utils/uid.js'; |
| 4 | +import { supplierId as spId } from '../src/utils/uid.js'; |
| 5 | +import { randomSalt } from '@windingtree/contracts'; |
5 | 6 | import { GenericQuery, GenericOfferOptions, RequestData, OfferData } from '../src/shared/types.js';
|
6 | 7 | import { buildRequest, buildOffer, verifyOffer } from '../src/shared/messages.js';
|
7 | 8 |
|
@@ -41,7 +42,7 @@ describe('Shared.messages', () => {
|
41 | 42 | const createOffer = (request: RequestData<CustomQuery>, expire: bigint | string = BigInt(1)) =>
|
42 | 43 | buildOffer<CustomQuery, CustomOfferOptions>({
|
43 | 44 | domain: typedDomain,
|
44 |
| - hdAccount: signer, |
| 45 | + account: signer, |
45 | 46 | supplierId,
|
46 | 47 | expire,
|
47 | 48 | request,
|
@@ -102,7 +103,7 @@ describe('Shared.messages', () => {
|
102 | 103 | it('should restore an offer from raw data', async () => {
|
103 | 104 | const fromRaw = await buildOffer<CustomQuery, CustomOfferOptions>({
|
104 | 105 | domain: typedDomain,
|
105 |
| - hdAccount: signer, |
| 106 | + account: signer, |
106 | 107 | supplierId,
|
107 | 108 | expire: offer.expire,
|
108 | 109 | request: offer.request,
|
@@ -133,7 +134,7 @@ describe('Shared.messages', () => {
|
133 | 134 | transferable: offer.payload.transferable,
|
134 | 135 | idOverride: offer.id,
|
135 | 136 | }),
|
136 |
| - ).to.rejectedWith('Either signer or signatureOverride must be provided'); |
| 137 | + ).to.rejectedWith('Either account or signatureOverride must be provided with options'); |
137 | 138 | });
|
138 | 139 | });
|
139 | 140 | });
|
|
0 commit comments