-
Notifications
You must be signed in to change notification settings - Fork 308
/
Copy pathfixtures-api.ts
83 lines (81 loc) · 1.8 KB
/
fixtures-api.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import nock from 'nock'
export const mockBedRockResponseSuccess = (): nock.Scope =>
nock('http://bedrock', {
encodedQueryParams: true,
})
.get('/')
.reply(
200,
() => ({
btc: [
{ type: 'addr', bridge_source: 'btc', addr: 'btc_1' },
{ type: 'addr', bridge_source: 'btc', addr: 'btc_2' },
],
evm: {
eth: {
chain_id: 1,
vault: 'vault_1',
tokens: [
['BTC', 'token_1', '18', '10'],
['BTC', '0x0000000000000000000000000000000000000000', '18', '10'],
],
},
bsc: {
chain_id: 56,
vault: 'vault_2',
tokens: [['BTC', 'token_2', '18', '10']],
},
},
}),
[
'Content-Type',
'application/json',
'Connection',
'close',
'Vary',
'Accept-Encoding',
'Vary',
'Origin',
],
)
.persist()
export const mockSolvResponseSuccess = (): nock.Scope =>
nock('http://solv', {
encodedQueryParams: true,
})
.get('/')
.reply(
200,
() => ({
accountName: 'SolvBTC',
result: [
{
id: 0,
address: 'btc_s_1',
symbol: 'BTC',
addressType: 'type_1',
walletName: 'name_1',
},
{
id: 1,
address: 'btc_s_2',
symbol: 'BTC',
addressType: 'type_2',
walletName: 'name_2',
},
],
count: 2,
lastUpdatedAt: '2021-01-01T11:11:11.112Z',
}),
[
'Content-Type',
'application/json',
'Connection',
'close',
'Vary',
'Accept-Encoding',
'Vary',
'Origin',
],
)
.persist()