mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-24 22:25:48 +00:00
committed by
Elliot Lee
parent
2112d4c0b3
commit
4e30b9b2fa
@@ -93,7 +93,9 @@
|
||||
"minItems": 1,
|
||||
"maxItems": 8
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["threshold", "weights"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"transferRate": {
|
||||
"description": " The fee to charge when users transfer this account’s issuances, as the decimal amount that must be sent to deliver 1 unit. Has precision up to 9 digits beyond the decimal point. Use `null` to set no fee.",
|
||||
|
||||
@@ -561,12 +561,26 @@ describe('RippleAPI', function () {
|
||||
});
|
||||
|
||||
it('prepareSettings - set signers', function () {
|
||||
const settings = requests.prepareSettings.signers;
|
||||
const settings = requests.prepareSettings.signers.normal;
|
||||
return this.api.prepareSettings(address, settings, instructions).then(
|
||||
_.partial(checkResult, responses.prepareSettings.signers,
|
||||
'prepare'));
|
||||
});
|
||||
|
||||
it('prepareSettings - signers no threshold', function () {
|
||||
const settings = requests.prepareSettings.signers.noThreshold;
|
||||
assert.throws(() => {
|
||||
this.api.prepareSettings(address, settings, instructions);
|
||||
}, this.api.errors.ValidationError);
|
||||
});
|
||||
|
||||
it('prepareSettings - signers no weights', function () {
|
||||
const settings = requests.prepareSettings.signers.noWeights;
|
||||
assert.throws(() => {
|
||||
this.api.prepareSettings(address, settings, instructions);
|
||||
}, this.api.errors.ValidationError);
|
||||
});
|
||||
|
||||
it('prepareSettings - fee for multisign', function () {
|
||||
const localInstructions = _.defaults({
|
||||
signersCount: 4
|
||||
|
||||
6
test/fixtures/requests/index.js
vendored
6
test/fixtures/requests/index.js
vendored
@@ -22,7 +22,11 @@ module.exports = {
|
||||
},
|
||||
prepareSettings: {
|
||||
domain: require('./prepare-settings'),
|
||||
signers: require('./prepare-settings-signers')
|
||||
signers: {
|
||||
normal: require('./prepare-settings-signers'),
|
||||
noThreshold: require('./prepare-settings-signers-no-threshold'),
|
||||
noWeights: require('./prepare-settings-signers-no-weights')
|
||||
}
|
||||
},
|
||||
prepareEscrowCreation: {
|
||||
normal: require('./prepare-escrow-creation'),
|
||||
|
||||
18
test/fixtures/requests/prepare-settings-signers-no-threshold.json
vendored
Normal file
18
test/fixtures/requests/prepare-settings-signers-no-threshold.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"signers": {
|
||||
"weights": [
|
||||
{
|
||||
"address": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"address": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"address": "rwBYyfufTzk77zUSKEu4MvixfarC35av1J",
|
||||
"weight": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
5
test/fixtures/requests/prepare-settings-signers-no-weights.json
vendored
Normal file
5
test/fixtures/requests/prepare-settings-signers-no-weights.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"signers": {
|
||||
"threshold": 2
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user