forked from smartcontractkit/external-adapters-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixtures.ts
90 lines (88 loc) · 2.34 KB
/
fixtures.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
84
85
86
87
88
89
90
import nock from 'nock'
export const mockMembersResponseSuccess = (): nock =>
nock('http://localhost:8081', {
encodedQueryParams: true,
})
.get('/')
.reply(
200,
(_, request) => ({
result: [
{
id: '5e5ec5d8a221fb000946fd4ab2d71522',
token: 'wbtc',
tags: ['dao', 'merchant', 'exchange'],
name: 'AirSwap',
addresses: [
{
id: '601323767069d60008cb538a682a0a35',
address: '0xfaf0708d1aed2566205d61f471d7e4aeb10910ea',
type: 'merchant',
balance: '0',
verified: true,
},
{
id: '601323767069d60008cb538b32c33cb1',
address: '3Lto4jAz1aGJQwNSAZ6TEEFuoHoBb8kRc7',
type: 'custodial',
balance: '0',
verified: false,
},
{
id: '601323767069d60008cb538cd1176c5d',
address: '3QS2zmhLYVTKmPewvWs4vze73ecinUM9Hd',
type: 'deposit',
balance: '0',
verified: false,
},
],
description:
'AirSwap is a peer-to-peer trading network built on Ethereum. Our mission is to empower people through global, frictionless trade.',
merchantPortalUri: '',
hasMerchantPortalUri: false,
websiteUri: 'https://www.airswap.io/',
},
],
count: 1,
}),
[
'Content-Type',
'application/json',
'Connection',
'close',
'Vary',
'Accept-Encoding',
'Vary',
'Origin',
],
)
export const mockAddressesResponseSuccess = (): nock =>
nock('http://localhost:8082', {
encodedQueryParams: true,
})
.get('/')
.reply(
200,
(_, request) => ({
result: [
{
id: '601c5e4b11b1d4001e37091aa2618ee9',
address: '31h6SJ58NqVrifuyXN5A19ByD6vgyKVHEY',
balance: '0',
type: 'custodial',
verified: false,
},
],
count: 1,
}),
[
'Content-Type',
'application/json',
'Connection',
'close',
'Vary',
'Accept-Encoding',
'Vary',
'Origin',
],
)