You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
500 when following /sendmany example from the docs #16
changed the title [-]500 when payment is less than the dust threshold using BitGo-Express[/-][+]500 when using /sendmany with BitGo-Express[/+]on Nov 19, 2015
Correction- the dust threshold is irrelevant, I made a mistake in the console. So I guess the question is- is sendmany broken? Or does it expect different input?
Ah, it looks an issue with the docs + not properly distinguishing between an array and an object in the JS.
The docs say /sendmany takes a recipients argument like [{address: '38BKDNZbPcLogvVbcx2ekJ9E6Vv94DqDqw’, amount: 1500}, ..], not {'38BKDNZbPcLogvVbcx2ekJ9E6Vv94DqDqw': 1500}.
Editing the title and leaving this open as a docs issue.
Hey there, can you clarify which network you were running Bitgo express on ? Your examples show both testnet and bitcoin addresses (if you use a testnet address on prod it will give the invalid address error).
@bencxr the original example is the code that I ran- on testnet. The other comments are about the docs, and thus use mainnet addresses.
It's a simple problem- the docs specify the wrong data structure to send, and wallet.js doesn't properly validate the data, instead throwing an inscrutable 500.
If there's a repo for the docs (or I just missed them) I'd be happy to provide a PR. I'm less confident in my JS or I'd patch that as well.
@mhluongo the docs specify the more recent version of the structure. If you look into transactionBuilder.js, you will see that we actually support both (backwards compatible). You can specify an array of address: amount object or dictionary of address keys with amounts (however you can't send more than one output to the same address this way). So I don't think that was the cause of a problem in this case.
Activity
[-]500 when payment is less than the dust threshold using BitGo-Express[/-][+]500 when using /sendmany with BitGo-Express[/+]mhluongo commentedon Nov 19, 2015
Correction- the dust threshold is irrelevant, I made a mistake in the console. So I guess the question is- is
sendmanybroken? Or does it expect different input?mhluongo commentedon Nov 19, 2015
Ah, it looks an issue with the docs + not properly distinguishing between an array and an object in the JS.
The docs say
/sendmanytakes a recipients argument like[{address: '38BKDNZbPcLogvVbcx2ekJ9E6Vv94DqDqw’, amount: 1500}, ..], not{'38BKDNZbPcLogvVbcx2ekJ9E6Vv94DqDqw': 1500}.Editing the title and leaving this open as a docs issue.
[-]500 when using /sendmany with BitGo-Express[/-][+]500 when following /sendmany example from the docs[/+]bencxr commentedon Nov 19, 2015
Hey there, can you clarify which network you were running Bitgo express on ? Your examples show both testnet and bitcoin addresses (if you use a testnet address on prod it will give the invalid address error).
mhluongo commentedon Nov 19, 2015
@bencxr the original example is the code that I ran- on testnet. The other comments are about the docs, and thus use mainnet addresses.
It's a simple problem- the docs specify the wrong data structure to send, and
wallet.jsdoesn't properly validate the data, instead throwing an inscrutable 500.If there's a repo for the docs (or I just missed them) I'd be happy to provide a PR. I'm less confident in my JS or I'd patch that as well.
mhluongo commentedon Nov 19, 2015
The first example was what I ran on testnet. The second is from the docs- it's using mainnet addresses because I copied it straight out.
bencxr commentedon Nov 20, 2015
@mhluongo the docs specify the more recent version of the structure. If you look into transactionBuilder.js, you will see that we actually support both (backwards compatible). You can specify an array of address: amount object or dictionary of address keys with amounts (however you can't send more than one output to the same address this way). So I don't think that was the cause of a problem in this case.
mhluongo commentedon Nov 20, 2015
Realized I'm running an odler version-
git pulling and trying it againMerge pull request #16 from BitGo/CT-265-erc20-tokens #16
Merge pull request #16 from BitGo/TRON-81-future-date-txs
BG-8888: Move secp256k1 dependent functions from bitgojs (#16)