mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
58f2e59e2a
ca46cb5 updated examples aff3497 updated icap example 9fa9b16 gulp 61f1ba6 Merge pull request #224 from alexvandesande/prefix-name-reorg 448dd30 Merge branch 'master' into develop 7753724 build files fc3dc7a build files c9ebd7e version 0.5.0 448cf03 Merge branch 'master' into develop 43e8f0e Merge pull request #207 from ethereum/icap 0a56733 updated icap example e67e705 Merge pull request #223 from ethereum/revert-222-master f229f4e Revert "sync sendTransaction returning tx address" ca58837 Merge pull request #222 from jesuscript/master 66a2b6c sync sendTransaction returning tx address b19e46c updated "deposit" method description, updated icap example contract abi fbb9a41 Merge branch 'develop' into icap 3bb6e4f sha3 backward compatibility. #205 d0be181 fixed const functions calls handling errors 858d0c6 lint 95aabe3 sendIBANTransaction && tests 5866f08 milli should have two l's bacb03c Rename Kwei to kwei, added support for some SI base units for ether dfd5060 use "official" namereg, updated examples d8ad2b7 Merge branch 'develop' into icap 3fb420f Merge branch 'master' into develop ea4d66e updated examples e6209c6 Merge branch 'master' into develop 71ae809 version 0.4.3 92e2a2f Merge branch 'master' into develop d03bec6 decoding of empty array, fixed #210, fixed #211 9abf38a fixed encoding of empty arrays 2ad458c Merge pull request #212 from ethereum/estimateGas be2e93f build d4bf850 fixed typo 0594e7f add estimateGas to contract methods and fixed sendTransaction return value 55c4653 test/isIBAN.js e9483a6 icap.html example 6fb04d8 namereg example allows to register custom names 60c9bf8 removed natspec example, added namereg example cd773fc updated docs 4af0085 web3.eth.namereg contract, icap in progress 02556ea removed unnecessary file d320552 crypto-js integrated into project adf91df sha3 init git-subtree-dir: libjsqrc/ethereumjs git-subtree-split: ca46cb5c94da4d37e9f4a5b8f6c0d117b72668d7
50 lines
1.6 KiB
JavaScript
50 lines
1.6 KiB
JavaScript
var chai = require('chai');
|
|
var assert = chai.assert;
|
|
var web3 = require('../index');
|
|
var FakeHttpProvider = require('./helpers/FakeHttpProvider');
|
|
var FakeHttpProvider2 = require('./helpers/FakeHttpProvider2');
|
|
|
|
describe('web3.eth.sendIBANTransaction', function () {
|
|
it('should send transaction', function () {
|
|
|
|
var iban = 'XE81ETHXREGGAVOFYORK';
|
|
var address = '0x1234567890123456789012345678901234500000';
|
|
var exAddress = '0x1234567890123456789012345678901234567890'
|
|
|
|
var provider = new FakeHttpProvider2();
|
|
web3.setProvider(provider);
|
|
web3.reset();
|
|
|
|
provider.injectResultList([{
|
|
result: exAddress
|
|
}, {
|
|
result: ''
|
|
}]);
|
|
|
|
var step = 0;
|
|
provider.injectValidation(function (payload) {
|
|
if (step === 0) {
|
|
step++;
|
|
assert.equal(payload.method, 'eth_call');
|
|
assert.deepEqual(payload.params, [{
|
|
data: '0x3b3b57de5852454700000000000000000000000000000000000000000000000000000000',
|
|
to: web3.eth.namereg.address
|
|
}, "latest"]);
|
|
|
|
return;
|
|
}
|
|
assert.equal(payload.method, 'eth_sendTransaction');
|
|
assert.deepEqual(payload.params, [{
|
|
data: '0xb214faa54741564f46594f524b0000000000000000000000000000000000000000000000',
|
|
from: address,
|
|
to: exAddress,
|
|
value: payload.params[0].value // don't check this
|
|
}]);
|
|
});
|
|
|
|
web3.eth.sendIBANTransaction(address, iban, 10000);
|
|
|
|
});
|
|
});
|
|
|