Skip to content

Commit fd36b42

Browse files
Fix sendmany test
Summary: * sendmany with multiple recipients must fail * sendmany with single recipient succeeds Reviewers: alex, barath Reviewed By: barath Subscribers: ben Differential Revision: https://phabricator.bitgo.com/D6184
1 parent 01cef6f commit fd36b42

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

test/bitgoExpressEth.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ describe('Bitgo Express TETH v2', function () {
108108
res.statusCode.should.equal(200);
109109
}));
110110

111-
// Disabled, see JIRA BG-994
112-
xit('can do sendmany', co(function *() {
111+
112+
it('can do sendmany', co(function *() {
113113
// fetch two new address
114114
let res, address1, address2;
115115
res = yield agent.post(`/api/v2/teth/wallet/${testWalletId}/address`).set(authHeader);
@@ -121,11 +121,26 @@ describe('Bitgo Express TETH v2', function () {
121121
.post(`/api/v2/teth/wallet/${testWalletId}/sendmany`)
122122
.set(authHeader)
123123
.send({
124+
walletPassphrase: testWalletPassphrase,
124125
recipients: [
125126
{ address: address1, amount: '10000' },
126127
{ address: address2, amount: '20000' },
127128
]
128129
});
130+
131+
// Ethereum does not support "sendmany" with multiple recipients, see JIRA BG-994
132+
res.statusCode.should.equal(400);
133+
134+
// Sendmany with single recipient is fine
135+
res = yield agent
136+
.post(`/api/v2/teth/wallet/${testWalletId}/sendmany`)
137+
.set(authHeader)
138+
.send({
139+
walletPassphrase: testWalletPassphrase,
140+
recipients: [
141+
{ address: address1, amount: '10000' },
142+
]
143+
});
129144
res.statusCode.should.equal(200);
130145
}));
131146
});

0 commit comments

Comments
 (0)