Skip to content

Commit 8012fc7

Browse files
committed
test(connect): adjust unit test
1 parent 79ed267 commit 8012fc7

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

packages/connect/src/backend/__tests__/Blockchain.test.ts

-27
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,4 @@ describe('backend/Blockchain', () => {
6767

6868
spy.mockClear();
6969
});
70-
71-
it('cache estimated fees (ethereum-like) - L2 network', async () => {
72-
const coinInfo = getEthereumNetwork('BASE');
73-
if (!coinInfo) throw new Error('coinInfo is missing');
74-
75-
const spy = jest.spyOn(BlockchainLink.prototype, 'estimateFee');
76-
77-
const backend = await initBlockchain(coinInfo, () => {});
78-
79-
// blocks: 1 was not requested before
80-
await backend.estimateFee({ blocks: [1] });
81-
expect(spy.mock.calls.length).toEqual(1);
82-
83-
// blocks: 1 is requested again, returned from cache
84-
await backend.estimateFee({ blocks: [1] });
85-
expect(spy.mock.calls.length).toEqual(1);
86-
87-
// blocks: 2 was not requested before
88-
await backend.estimateFee({ blocks: [1, 2] });
89-
expect(spy.mock.calls.length).toEqual(2);
90-
91-
// request with "specific" field
92-
await backend.estimateFee({ blocks: [1, 2], specific: { value: '0x0' } });
93-
expect(spy.mock.calls.length).toEqual(3);
94-
95-
spy.mockClear();
96-
});
9770
});

packages/connect/src/utils/__tests__/deviceFeaturesUtils.test.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,16 @@ describe('utils/deviceFeaturesUtils', () => {
129129
expect(getUnavailableCapabilities(featT1B1, coins2)).toEqual({
130130
ada: 'no-support',
131131
tada: 'no-support',
132-
bnb: 'no-support',
133-
bsc: 'update-required',
134132
arb: 'update-required',
135133
base: 'update-required',
134+
bnb: 'no-support',
135+
bsc: 'update-required',
136136
crw: 'update-required',
137137
eos: 'no-support',
138138
maid: 'no-capability',
139139
pol: 'update-required',
140-
op: 'update-required',
141140
omni: 'no-capability',
141+
op: 'update-required',
142142
ppc: 'update-required',
143143
sol: 'no-support',
144144
dsol: 'no-support',
@@ -150,6 +150,7 @@ describe('utils/deviceFeaturesUtils', () => {
150150
txrp: 'no-support',
151151
uno: 'update-required',
152152
usdt: 'no-capability',
153+
xec: 'update-required',
153154
xmr: 'no-support',
154155
xrp: 'no-support',
155156
xtz: 'no-support',
@@ -182,13 +183,14 @@ describe('utils/deviceFeaturesUtils', () => {
182183
'eip712-domain-only': 'update-required',
183184
maid: 'no-capability',
184185
pol: 'update-required',
185-
op: 'update-required',
186186
omni: 'no-capability',
187+
op: 'update-required',
187188
taproot: 'update-required',
188189
tsep: 'update-required',
189190
thol: 'update-required',
190191
trvn: 'update-required',
191192
usdt: 'no-capability',
193+
xec: 'update-required',
192194
coinjoin: 'update-required',
193195
signMessageNoScriptType: 'update-required',
194196
sol: 'no-capability',
@@ -224,6 +226,7 @@ describe('utils/deviceFeaturesUtils', () => {
224226
tsep: 'update-required',
225227
usdt: 'no-capability',
226228
vtc: 'no-support',
229+
xec: 'update-required',
227230
xem: 'no-support',
228231
chunkify: 'update-required',
229232
entropyCheck: 'update-required',

0 commit comments

Comments
 (0)