From a8aeeeced9b9f896608160a3d34aaedf00e3dc96 Mon Sep 17 00:00:00 2001 From: wltsmrz Date: Fri, 21 Nov 2014 10:52:50 -0800 Subject: [PATCH] Use account_trustline_frozen rather than account_froze_trustline --- api/trustlines.js | 10 ++-- test/_payments-test.js | 6 +-- test/fixtures/trustlines.js | 96 ++++++++++++++++++------------------- test/trustlines-test.js | 4 +- 4 files changed, 58 insertions(+), 58 deletions(-) diff --git a/api/trustlines.js b/api/trustlines.js index 44706fcd..214feffd 100644 --- a/api/trustlines.js +++ b/api/trustlines.js @@ -105,8 +105,8 @@ function getTrustLines(request, response, next) { reciprocated_limit: line.limit_peer, account_allows_rippling: line.no_ripple ? !line.no_ripple : true, counterparty_allows_rippling: line.no_ripple_peer ? !line.no_ripple_peer : true, - account_froze_trustline: line.freeze ? line.freeze : false, - counterparty_froze_trustline: line.freeze_peer ? line.freeze_peer : false + account_trustline_frozen: line.freeze ? line.freeze : false, + counterparty_trustline_frozen: line.freeze_peer ? line.freeze_peer : false }); }); @@ -218,7 +218,7 @@ function addTrustLine(request, response, next) { currency: line.currency, counterparty: line.issuer, account_allows_rippling: allows_rippling, - account_froze_trustline: froze_trustline, + account_trustline_frozen: froze_trustline, ledger: String(summary.submitIndex), hash: m.tx_json.hash, state: m.validated === true ? 'validated' : 'pending' @@ -276,8 +276,8 @@ function addTrustLine(request, response, next) { } } - if (typeof options.trustline.account_froze_trustline === 'boolean') { - if (options.trustline.account_froze_trustline) { + if (typeof options.trustline.account_trustline_frozen === 'boolean') { + if (options.trustline.account_trustline_frozen) { transaction.setFlags('SetFreeze'); } else { transaction.setFlags('ClearFreeze'); diff --git a/test/_payments-test.js b/test/_payments-test.js index 503987cd..7523711a 100644 --- a/test/_payments-test.js +++ b/test/_payments-test.js @@ -724,7 +724,7 @@ suite('payments', function() { "currency": "USD", "counterparty": "rJRLoJSErtNRFnbCyHEUYnRUKNwkVYDM7U", "account_allows_rippling": true, - "account_froze_trustline": false, + "account_trustline_frozen": false, "state": "pending" } }); @@ -1006,7 +1006,7 @@ suite('payments', function() { "currency": "USD", "counterparty": "r3YHFNkQRJDPc9aCkRojPLwKVwok3ihgBJ", "account_allows_rippling": true, - "account_froze_trustline": false, + "account_trustline_frozen": false, "state": "pending" } }); @@ -1040,7 +1040,7 @@ suite('payments', function() { "currency": "USD", "counterparty": "r3YHFNkQRJDPc9aCkRojPLwKVwok3ihgBJ", "account_allows_rippling": true, - "account_froze_trustline": false, + "account_trustline_frozen": false, "state": "pending" } }); diff --git a/test/fixtures/trustlines.js b/test/fixtures/trustlines.js index da33903c..1637c0ef 100644 --- a/test/fixtures/trustlines.js +++ b/test/fixtures/trustlines.js @@ -259,8 +259,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '10', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z', @@ -269,8 +269,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: false, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q', @@ -279,8 +279,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rHpXfibHgSb64n8kK9QWDpdbfqSpYbM9a4', @@ -289,8 +289,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: true, counterparty_allows_rippling: true , - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun', @@ -299,8 +299,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK', @@ -309,8 +309,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E', @@ -319,8 +319,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B', @@ -329,8 +329,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B', @@ -339,8 +339,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B', @@ -349,8 +349,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rpgKWEmNqSDAGFhy5WDnsyPqfQxbWxKeVd', @@ -359,8 +359,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '10', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rBJ3YjwXi2MGbg7GVLuTXUWQ8DjL7tDXh4', @@ -369,8 +369,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '10', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: true + account_trustline_frozen: false, + counterparty_trustline_frozen: true }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun', @@ -379,8 +379,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA', @@ -389,8 +389,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B', @@ -399,8 +399,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: true, - counterparty_froze_trustline: false + account_trustline_frozen: true, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z', @@ -409,8 +409,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: false, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'r9vbV3EHvXWjSkeQ6CAcYVPGeq7TuiXY2X', @@ -419,8 +419,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B', @@ -429,8 +429,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rfF3PNkwkq1DygW2wum2HK3RGfgkJjdPVD', @@ -439,8 +439,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rwUVoVMSURqNyvocPCcvLu3ygJzZyw8qwp', @@ -449,8 +449,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '50', account_allows_rippling: true, counterparty_allows_rippling: false, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rE6R3DWF9fBD7CyiQciePF9SqK58Ubp8o2', @@ -459,8 +459,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '100', account_allows_rippling: true, counterparty_allows_rippling: false, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rE6R3DWF9fBD7CyiQciePF9SqK58Ubp8o2', @@ -469,8 +469,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '100', account_allows_rippling: true, counterparty_allows_rippling: false, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rs9M85karFkCRjvc6KMWn8Coigm9cbcgcx', @@ -479,8 +479,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '0', account_allows_rippling: false, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false }, { account: 'r3GgMwvgvP8h4yVWvjH1dPZNvC37TjzBBE', counterparty: 'rEhDDUUNxpXgEHVJtC2cjXAgyx5VCFxdMF', @@ -489,8 +489,8 @@ module.exports.RESTAccountTrustlinesResponse = JSON.stringify({ reciprocated_limit: '1', account_allows_rippling: true, counterparty_allows_rippling: true, - account_froze_trustline: false, - counterparty_froze_trustline: false + account_trustline_frozen: false, + counterparty_trustline_frozen: false } ] }); diff --git a/test/trustlines-test.js b/test/trustlines-test.js index b6f46463..08c9f7d2 100644 --- a/test/trustlines-test.js +++ b/test/trustlines-test.js @@ -622,7 +622,7 @@ suite('post trustlines', function() { limit: '1', currency: 'USD', counterparty: addresses.COUNTERPARTY, - account_froze_trustline: true + account_trustline_frozen: true } }) .expect(testutils.checkStatus(201)) @@ -635,7 +635,7 @@ suite('post trustlines', function() { assert.strictEqual(body.trustline.counterparty, addresses.COUNTERPARTY); assert.strictEqual(body.trustline.limit, '1'); assert.strictEqual(body.trustline.currency, 'USD'); - assert.strictEqual(body.trustline.account_froze_trustline, true); + assert.strictEqual(body.trustline.account_trustline_frozen, true); }) .end(done); });