From 32bf736ede7cb791c4f160beae51e8d087f19f56 Mon Sep 17 00:00:00 2001 From: George Kudrayvtsev Date: Tue, 11 Apr 2023 15:33:13 -0700 Subject: [PATCH] Fixup linting and clean up yarn scripts Add jsdoc support --- .eslintrc.js | 6 +- .jsdoc.json => config/.jsdoc.json | 2 +- .nycrc => config/.nycrc | 0 .prettierignore => config/.prettierignore | 0 karma.conf.js => config/karma.conf.js | 8 +- .../prettier.config.js | 0 tsconfig.json => config/tsconfig.json | 0 .../webpack.config.browser.js | 8 +- gulpfile.js | 192 ---- package.json | 16 +- src/.eslintrc.js | 11 +- test/.eslintrc.js | 10 +- test/integration/apiary.js | 2 +- test/integration/client_headers_test.js | 4 +- test/integration/streaming_test.js | 12 +- test/unit/federation_server_test.js | 31 +- test/unit/horizon_axios_client_test.js | 4 +- test/unit/horizon_path_test.js | 8 +- test/unit/liquidity_pool_endpoints_test.js | 456 ++++----- test/unit/server/claimable_balances.js | 48 +- test/unit/server/join_test.js | 54 +- test/unit/server_check_memo_required_test.js | 48 +- test/unit/server_test.js | 888 +++++++++--------- test/unit/server_transaction_test.js | 42 +- test/unit/stellar_toml_resolver_test.js | 16 +- test/unit/utils_test.js | 130 +-- 26 files changed, 900 insertions(+), 1096 deletions(-) rename .jsdoc.json => config/.jsdoc.json (89%) rename .nycrc => config/.nycrc (100%) rename .prettierignore => config/.prettierignore (100%) rename karma.conf.js => config/karma.conf.js (80%) rename prettier.config.js => config/prettier.config.js (100%) rename tsconfig.json => config/tsconfig.json (100%) rename webpack.config.browser.js => config/webpack.config.browser.js (87%) delete mode 100644 gulpfile.js diff --git a/.eslintrc.js b/.eslintrc.js index 4462de45e..1ad7098b9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,11 +1,11 @@ module.exports = { env: { - es6: true + es6: true, }, extends: ["airbnb-base", "prettier"], plugins: ["@babel", "prettier", "prefer-import"], parser: "@babel/eslint-parser", rules: { - "node/no-unpublished-require": 0 - } + "node/no-unpublished-require": 0, + }, }; diff --git a/.jsdoc.json b/config/.jsdoc.json similarity index 89% rename from .jsdoc.json rename to config/.jsdoc.json index 2881d2ae2..55041dc28 100644 --- a/.jsdoc.json +++ b/config/.jsdoc.json @@ -4,7 +4,7 @@ "exclude": "js-stellar-base/src/generated" }, "opts": { - "destination": "./jsdoc/", + "destination": "jsdoc/", "recurse": true, "template": "node_modules/minami", "readme": "README.md" diff --git a/.nycrc b/config/.nycrc similarity index 100% rename from .nycrc rename to config/.nycrc diff --git a/.prettierignore b/config/.prettierignore similarity index 100% rename from .prettierignore rename to config/.prettierignore diff --git a/karma.conf.js b/config/karma.conf.js similarity index 80% rename from karma.conf.js rename to config/karma.conf.js index 08e78c84b..5ea58809c 100644 --- a/karma.conf.js +++ b/config/karma.conf.js @@ -10,13 +10,13 @@ module.exports = function (config) { browsers: ["FirefoxHeadless", "ChromeHeadless"], files: [ - "dist/stellar-sdk.js", // webpack should build this first - "test/test-browser.js", - "test/unit/**/*.js" + "../dist/stellar-sdk.js", // webpack should build this first + "../test/test-browser.js", + "../test/unit/**/*.js" ], preprocessors: { - "test/**/*.js": ["webpack"] + "../test/**/*.js": ["webpack"] }, webpack: webpackConfig, diff --git a/prettier.config.js b/config/prettier.config.js similarity index 100% rename from prettier.config.js rename to config/prettier.config.js diff --git a/tsconfig.json b/config/tsconfig.json similarity index 100% rename from tsconfig.json rename to config/tsconfig.json diff --git a/webpack.config.browser.js b/config/webpack.config.browser.js similarity index 87% rename from webpack.config.browser.js rename to config/webpack.config.browser.js index d6b188eed..dededec48 100644 --- a/webpack.config.browser.js +++ b/config/webpack.config.browser.js @@ -9,8 +9,8 @@ const config = { target: "web", // https://stackoverflow.com/a/34018909 entry: { - "stellar-sdk": path.resolve(__dirname, "./src/browser.ts"), - "stellar-sdk.min": path.resolve(__dirname, "./src/browser.ts") + "stellar-sdk": path.resolve(__dirname, "../src/browser.ts"), + "stellar-sdk.min": path.resolve(__dirname, "../src/browser.ts") }, resolve: { fallback: { @@ -24,7 +24,7 @@ const config = { clean: true, library: "StellarSdk", compareBeforeEmit: true, - path: path.resolve(__dirname, "./dist") + path: path.resolve(__dirname, "../dist") }, mode: process.env.NODE_ENV ?? "development", devtool: process.env.NODE_ENV === "production" ? false : "inline-source-map", @@ -58,7 +58,7 @@ const config = { plugins: [ // this must be first for karma to work (see line 5 of karma.conf.js) new ESLintPlugin({ - overrideConfigFile: path.resolve(__dirname, "./.eslintrc.js") + overrideConfigFile: path.resolve(__dirname, "../.eslintrc.js") }), // Ignore native modules (sodium-native) new webpack.IgnorePlugin({ resourceRegExp: /sodium-native/ }), diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 7e779d843..000000000 --- a/gulpfile.js +++ /dev/null @@ -1,192 +0,0 @@ -'use strict'; - -var cp = require('child_process'); -var coveralls = require('@kollavarsham/gulp-coveralls'); -var gulp = require('gulp'); -var isparta = require('isparta'); -var plugins = require('gulp-load-plugins')(); -var webpack = require('webpack'); -var webpackStream = require('webpack-stream'); -var webpackConfigBrowser = require('./webpack.config.browser.js'); -var clear = require('clear'); -var plumber = require('gulp-plumber'); -var del = require('del'); - -gulp.task('lint:src', function lintSrc() { - return gulp - .src(['src/**/*.ts']) - .pipe(plumber()) - .pipe(plugins.tslint({ formatter: "verbose" })) - .pipe(plugins.tslint.report()); -}); - -// Lint our test code -gulp.task('lint:test', function lintTest() { - return gulp - .src(['test/unit/**/*.js', 'gulpfile.js']) - .pipe(plumber()) - .pipe(plugins.eslint()) - .pipe(plugins.eslint.format()) - .pipe(plugins.eslint.failAfterError()); -}); - -gulp.task('clean', function clean() { - return del(['dist/', 'lib/']); -}); - -gulp.task( - 'build:node', - gulp.series( - function buildNode(done) { - // TODO: Gulp-ify using `gulp-typescript`. - try { - cp.execSync(`npx tsc`, {stdio: 'inherit'}) - done() - } catch(err) { - done(err) - } - } - ) -); - -gulp.task( - 'build:docs', - gulp.series( - function buildNode(done) { - // TODO: Gulp-ify using `gulp-typescript`. - try { - cp.execSync(`npx tsc --removeComments false --outDir libdocs --target es6 --module esnext`, {stdio: 'inherit'}) - done() - } catch(err) { - done(err) - } - } - ) -); - -gulp.task( - 'build:browser', - gulp.parallel( - 'lint:src', - function buildBrowser() { - return gulp - .src('src/browser.ts') - .pipe( - webpackStream(webpackConfigBrowser), webpack - ) - .pipe(gulp.dest('dist')) - } - ) -); - -gulp.task('test:watch', function() { - return gulp.watch(['src/**/*', 'test/unit/**/*.js'], gulp.series(['clear-screen', 'test:unit'])); -}) - -gulp.task( - 'test:unit', - gulp.series('build:node', function testUnit() { - return gulp.src(['test/test-nodejs.js', 'test/unit/**/*.js']).pipe( - plugins.mocha({ - reporter: ['spec'] - }) - ); - }) -); - -gulp.task( - 'test:browser', - gulp.series('build:browser', function testBrowser(done) { - var Server = require('karma').Server; - var server = new Server( - { configFile: __dirname + '/karma.conf.js' }, - (exitCode) => { - if (exitCode !== 0) { - done(new Error(`Bad exit code ${exitCode}`)); - } else { - done(); - } - } - ); - server.start(); - }) -); - -gulp.task( - 'test:sauce', - gulp.series(gulp.parallel('build:browser', 'build:node'), function testSauce(done) { - var Server = require('karma').Server; - var server = new Server( - { configFile: __dirname + '/karma-sauce.conf.js' }, - (exitCode) => { - if (exitCode !== 0) { - done(new Error(`Bad exit code ${exitCode}`)); - } else { - done(); - } - } - ); - server.start(); - }) -); - -gulp.task('clear-screen', function clearScreen(cb) { - clear(); - cb(); -}); - -gulp.task('clean-coverage', function cleanCoverage() { - return del(['coverage']); -}); - -gulp.task( - 'test:init-istanbul', - gulp.series('clean-coverage', function testInitIstanbul() { - return gulp - .src(['src/**/*.js']) - .pipe( - plugins.istanbul({ - instrumenter: isparta.Instrumenter - }) - ) - .pipe(plugins.istanbul.hookRequire()); - }) -); - -gulp.task( - 'test:integration', - gulp.series('build:node', 'test:init-istanbul', function testIntegration() { - return gulp - .src([ - 'test/integration/**/*.js' - ]) - .pipe( - plugins.mocha({ - reporter: ['spec'] - }) - ) - .pipe(plugins.istanbul.writeReports()); - }) -); - -gulp.task('submit-coverage', function submitCoverage() { - return gulp.src('./coverage/**/lcov.info').pipe(coveralls()); -}); - -gulp.task('build', gulp.series('clean', 'build:node', 'build:browser')); - -gulp.task( - 'test', - gulp.series('clean', 'test:unit', 'test:browser', 'test:integration', function test(done) { - done(); - }) -); - -gulp.task( - 'watch', - gulp.series('build', function watch() { - return gulp.watch('src/**/*', gulp.series(['clear-screen', 'build'])); - }) -); - -gulp.task('default', gulp.series('build')); diff --git a/package.json b/package.json index 5bc2a7c69..2c732e7a7 100644 --- a/package.json +++ b/package.json @@ -26,19 +26,20 @@ "build": "cross-env NODE_ENV=development yarn _build", "build:prod": "cross-env NODE_ENV=production yarn _build", "build:node": "babel --extensions '.ts' --out-dir lib/ src/", - "build:browser": "webpack -c ./webpack.config.browser.js", + "build:browser": "webpack -c config/webpack.config.browser.js", "clean": "rm -rf lib/ dist/ coverage/ .nyc_output/", - "docs": "TODO", + "docs": "jsdoc -c ./config/.jsdoc.json --verbose", "test": "yarn test:node && yarn test:integration && yarn test:browser", "test:node": "yarn _nyc mocha --recursive 'test/unit/**/*.js'", "test:integration": "yarn _nyc mocha --recursive 'test/integration/**/*.js'", - "test:browser": "karma start ./karma.conf.js", - "lint": "eslint -c ./.eslintrc.js src/", - "fmt": "prettier --config prettier.config.js --ignore-path ./.prettierignore --write './**/*.js'", - "preversion": "yarn clean && yarn pretty && yarn build:prod && yarn test", + "test:browser": "karma start config/karma.conf.js", + "lint": "eslint -c .eslintrc.js src/", + "fmt": "yarn lint --fix && yarn _prettier", + "preversion": "yarn clean && yarn fmt && yarn lint && yarn build:prod && yarn test", "prepare": "yarn build:prod", "_build": "yarn build:node && yarn build:browser", - "_nyc": "nyc --nycrc-path ./.nycrc" + "_nyc": "nyc --nycrc-path config/.nycrc", + "_prettier": "prettier --ignore-path config/.prettierignore --write './**/*.js'" }, "husky": { "hooks": { @@ -51,7 +52,6 @@ "yarn lint" ] }, - "prettier": "prettier.config.js", "mocha": { "reporter": "spec", "require": [ diff --git a/src/.eslintrc.js b/src/.eslintrc.js index e22dce75e..7ceb3272d 100644 --- a/src/.eslintrc.js +++ b/src/.eslintrc.js @@ -1,9 +1,7 @@ module.exports = { env: { - es6: true + es6: true, }, - extends: ["airbnb-base", "prettier"], - plugins: ["prettier", "prefer-import"], rules: { // OFF "import/prefer-default-export": 0, @@ -28,15 +26,14 @@ module.exports = { "valid-jsdoc": [ 1, { - requireReturnDescription: false - } + requireReturnDescription: false, + }, ], "prefer-const": 1, "object-shorthand": 1, "require-await": 1, // ERROR - "no-unused-expressions": [2, { allowTaggedTemplates: true }] + "no-unused-expressions": [2, { allowTaggedTemplates: true }], }, - parser: "babel-eslint" }; diff --git a/test/.eslintrc.js b/test/.eslintrc.js index 567325422..5aa559806 100644 --- a/test/.eslintrc.js +++ b/test/.eslintrc.js @@ -1,18 +1,16 @@ module.exports = { env: { - mocha: true + mocha: true, }, - parser: "@babel/eslint-parser", - plugins: ["@babel"], globals: { StellarSdk: true, axios: true, chai: true, sinon: true, expect: true, - HorizonAxiosClient: true + HorizonAxiosClient: true, }, rules: { - "no-unused-vars": 0 - } + "no-unused-vars": 0, + }, }; diff --git a/test/integration/apiary.js b/test/integration/apiary.js index a94285c9c..7050bb4ee 100644 --- a/test/integration/apiary.js +++ b/test/integration/apiary.js @@ -55,7 +55,7 @@ describe("tests the /liquidity_pools endpoint", function () { effects: server.effects(), operations: server.operations(), trades: server.trades(), - transactions: server.transactions() + transactions: server.transactions(), }; Object.keys(testCases).forEach((suffix) => { diff --git a/test/integration/client_headers_test.js b/test/integration/client_headers_test.js index b48ae8743..b285ab605 100644 --- a/test/integration/client_headers_test.js +++ b/test/integration/client_headers_test.js @@ -57,13 +57,13 @@ describe("integration tests: client headers", function (done) { } closeStream = new StellarSdk.Server(`http://localhost:${port}`, { - allowHttp: true + allowHttp: true, }) .operations() .stream({ onerror: (err) => { done(err); - } + }, }); }); }); diff --git a/test/integration/streaming_test.js b/test/integration/streaming_test.js index 8e8abf8e6..080fafc1c 100644 --- a/test/integration/streaming_test.js +++ b/test/integration/streaming_test.js @@ -27,7 +27,7 @@ describe("integration tests: streaming", function (done) { } closeStream = new StellarSdk.Server(`http://localhost:${port}`, { - allowHttp: true + allowHttp: true, }) .operations() .stream({ @@ -35,7 +35,7 @@ describe("integration tests: streaming", function (done) { server.close(); closeStream(); done(); - } + }, }); }); }); @@ -60,7 +60,7 @@ describe("integration tests: streaming", function (done) { response.writeHead(200, { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", - Connection: "keep-alive" + Connection: "keep-alive", }); response.write("retry: 10\nevent: close\ndata: byebye\n\n"); }; @@ -73,7 +73,7 @@ describe("integration tests: streaming", function (done) { } closeStream = new StellarSdk.Server(`http://localhost:${port}`, { - allowHttp: true + allowHttp: true, }) .operations() .stream({ @@ -82,7 +82,7 @@ describe("integration tests: streaming", function (done) { }, onerror: (err) => { done(err); - } + }, }); }); }); @@ -123,7 +123,7 @@ describe("end-to-end tests: real streaming", function (done) { onmessage: (msg) => { transactions.push(msg); }, - onerror: finishTest + onerror: finishTest, }); let timeout = setTimeout(finishTest, DURATION * 1000); diff --git a/test/unit/federation_server_test.js b/test/unit/federation_server_test.js index c76596cb7..bc3bad34d 100644 --- a/test/unit/federation_server_test.js +++ b/test/unit/federation_server_test.js @@ -64,8 +64,8 @@ describe("federation-server.js tests", function () { data: { stellar_address: "bob*stellar.org", account_id: - "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS" - } + "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS", + }, }) ); }); @@ -115,8 +115,8 @@ describe("federation-server.js tests", function () { data: { stellar_address: "bob*stellar.org", account_id: - "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS" - } + "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS", + }, }) ); }); @@ -153,8 +153,8 @@ describe("federation-server.js tests", function () { data: { stellar_address: "bob*stellar.org", account_id: - "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS" - } + "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS", + }, }) ); }); @@ -188,7 +188,7 @@ describe("federation-server.js tests", function () { # The endpoint which clients should query to resolve stellar addresses # for users on your domain. FEDERATION_SERVER="https://api.stellar.org/federation" -` +`, }) ); @@ -211,7 +211,7 @@ FEDERATION_SERVER="https://api.stellar.org/federation" .withArgs(sinon.match("https://acme.com/.well-known/stellar.toml")) .returns( Promise.resolve({ - data: "" + data: "", }) ); @@ -229,7 +229,8 @@ FEDERATION_SERVER="https://api.stellar.org/federation" "GAFSZ3VPBC2H2DVKCEWLN3PQWZW6BVDMFROWJUDAJ3KWSOKQIJ4R5W4J" ) .should.eventually.deep.equal({ - account_id: "GAFSZ3VPBC2H2DVKCEWLN3PQWZW6BVDMFROWJUDAJ3KWSOKQIJ4R5W4J" + account_id: + "GAFSZ3VPBC2H2DVKCEWLN3PQWZW6BVDMFROWJUDAJ3KWSOKQIJ4R5W4J", }) .notify(done); }); @@ -250,7 +251,7 @@ FEDERATION_SERVER="https://api.stellar.org/federation" # The endpoint which clients should query to resolve stellar addresses # for users on your domain. FEDERATION_SERVER="https://api.stellar.org/federation" -` +`, }) ); @@ -268,8 +269,8 @@ FEDERATION_SERVER="https://api.stellar.org/federation" account_id: "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS", memo_type: "id", - memo: "100" - } + memo: "100", + }, }) ); @@ -279,7 +280,7 @@ FEDERATION_SERVER="https://api.stellar.org/federation" account_id: "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS", memo_type: "id", - memo: "100" + memo: "100", }) .notify(done); }); @@ -305,8 +306,8 @@ FEDERATION_SERVER="https://api.stellar.org/federation" account_id: "GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS", memo_type: "id", - memo: 100 - } + memo: 100, + }, }) ); diff --git a/test/unit/horizon_axios_client_test.js b/test/unit/horizon_axios_client_test.js index 0b0b2b8d8..e0f75175f 100644 --- a/test/unit/horizon_axios_client_test.js +++ b/test/unit/horizon_axios_client_test.js @@ -25,7 +25,7 @@ describe("getCurrentServerTime", () => { it("returns null when the old time is too old", () => { SERVER_TIME_MAP.host = { serverTime: 10, - localTimeRecorded: 5 + localTimeRecorded: 5, }; expect(getCurrentServerTime("host")).to.be.null; }); @@ -33,7 +33,7 @@ describe("getCurrentServerTime", () => { it("returns the delta between then and now", () => { SERVER_TIME_MAP.host = { serverTime: 10, - localTimeRecorded: 5005 + localTimeRecorded: 5005, }; expect(getCurrentServerTime("host")).to.equal(55); }); diff --git a/test/unit/horizon_path_test.js b/test/unit/horizon_path_test.js index 8d531832f..65ef48ace 100644 --- a/test/unit/horizon_path_test.js +++ b/test/unit/horizon_path_test.js @@ -16,8 +16,8 @@ describe("horizon path tests", function () { data: { url: serverUrl, random: Math.round(1000 * Math.random()), - endpoint: "bogus" - } + endpoint: "bogus", + }, }; function prepareAxios(axiosMock, endpoint) { @@ -119,13 +119,13 @@ describe("horizon path tests", function () { let fakeTransaction = new StellarSdk.TransactionBuilder(account, { fee: 100, - networkPassphrase: StellarSdk.Networks.TESTNET + networkPassphrase: StellarSdk.Networks.TESTNET, }) .addOperation( StellarSdk.Operation.payment({ destination: keypair.publicKey(), asset: StellarSdk.Asset.native(), - amount: "100.50" + amount: "100.50", }) ) .setTimeout(StellarSdk.TimeoutInfinite) diff --git a/test/unit/liquidity_pool_endpoints_test.js b/test/unit/liquidity_pool_endpoints_test.js index 7da597a93..118b9c72a 100644 --- a/test/unit/liquidity_pool_endpoints_test.js +++ b/test/unit/liquidity_pool_endpoints_test.js @@ -25,14 +25,14 @@ describe("/liquidity_pools tests", function () { const rootResponse = { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc", }, next: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc", }, prev: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=desc" - } + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=desc", + }, }, _embedded: { records: [ @@ -47,14 +47,14 @@ describe("/liquidity_pools tests", function () { { amount: "1000.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "2000.0000000", asset: - "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" - } - ] + "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", + }, + ], }, { id: "2", @@ -67,17 +67,17 @@ describe("/liquidity_pools tests", function () { { amount: "1000.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "1200.0000000", asset: - "USDC:GC5W3BH2MQRQK2H4A6LP3SXDSAAY2W2W64OWKKVNQIAOVWSAHFDEUSDC" - } - ] - } - ] - } + "USDC:GC5W3BH2MQRQK2H4A6LP3SXDSAAY2W2W64OWKKVNQIAOVWSAHFDEUSDC", + }, + ], + }, + ], + }, }; let emptyResponse = copyJson(rootResponse); @@ -115,20 +115,20 @@ describe("/liquidity_pools tests", function () { const testCases = [ { assets: [StellarSdk.Asset.native()], - response: emptyResponse + response: emptyResponse, }, { assets: [EURT], - response: rootResponse + response: rootResponse, }, { assets: [PHP], - response: phpResponse + response: phpResponse, }, { assets: [EURT, PHP], - response: phpResponse - } + response: phpResponse, + }, ]; testCases.forEach((testCase) => { @@ -206,14 +206,14 @@ describe("/liquidity_pools tests", function () { { amount: "1000.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "2000.0000000", asset: - "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" - } - ] + "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", + }, + ], }; this.axiosMock @@ -235,14 +235,14 @@ describe("/liquidity_pools tests", function () { const poolOpsResponse = { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/operations?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/operations?cursor=113725249324879873&limit=10&order=asc", }, next: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/operations?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/operations?cursor=113725249324879873&limit=10&order=asc", }, prev: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/operations?cursor=113725249324879873&limit=10&order=desc" - } + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/operations?cursor=113725249324879873&limit=10&order=desc", + }, }, _embedded: { records: [ @@ -263,37 +263,37 @@ describe("/liquidity_pools tests", function () { { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "1000.0000005" + amount: "1000.0000005", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "3000.0000005" - } + amount: "3000.0000005", + }, ], min_price: "0.2680000", min_price_r: { n: 67, - d: 250 + d: 250, }, max_price: "0.3680000", max_price_r: { n: 73, - d: 250 + d: 250, }, reserves_deposited: [ { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "983.0000005" + amount: "983.0000005", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2378.0000005" - } + amount: "2378.0000005", + }, ], - shares_received: "1000" + shares_received: "1000", }, { id: "3697472920621057", @@ -312,27 +312,27 @@ describe("/liquidity_pools tests", function () { { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - min: "1000.0000005" + min: "1000.0000005", }, { asset: "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - min: "3000.0000005" - } + min: "3000.0000005", + }, ], shares: "200", reserves_received: [ { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "993.0000005" + amount: "993.0000005", }, { asset: "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2478.0000005" - } - ] + amount: "2478.0000005", + }, + ], }, { id: "157639717969326081", @@ -349,7 +349,7 @@ describe("/liquidity_pools tests", function () { liquidity_pool_id: "ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a", limit: "1000", - trustor: "GBBWI7TEVQBPEUXKYNGI3GBAH7EHFEREONKK3UK56ZSLJIDIYHQJCVSG" + trustor: "GBBWI7TEVQBPEUXKYNGI3GBAH7EHFEREONKK3UK56ZSLJIDIYHQJCVSG", }, { id: "157235845014249474-0", @@ -370,11 +370,11 @@ describe("/liquidity_pools tests", function () { base_is_seller: false, price: { n: "10000000", - d: "899997" - } - } - ] - } + d: "899997", + }, + }, + ], + }, }; it("retrieves its operations", function (done) { @@ -399,45 +399,45 @@ describe("/liquidity_pools tests", function () { const poolTxsResponse = { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/transactions?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/transactions?cursor=113725249324879873&limit=10&order=asc", }, next: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/transactions?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/transactions?cursor=113725249324879873&limit=10&order=asc", }, prev: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/transactions?cursor=113725249324879873&limit=10&order=desc" - } + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/transactions?cursor=113725249324879873&limit=10&order=desc", + }, }, _embedded: { records: [ { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908" + href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908", }, account: { - href: "https://private-33c60-amm3.apiary-mock.com/accounts/GAHQN6YNYD6ZT7TLAVE4R36MSZWQJZ22XB3WD4RLSHURMXHW4VHJIDF7" + href: "https://private-33c60-amm3.apiary-mock.com/accounts/GAHQN6YNYD6ZT7TLAVE4R36MSZWQJZ22XB3WD4RLSHURMXHW4VHJIDF7", }, ledger: { - href: "https://private-33c60-amm3.apiary-mock.com/ledgers/895788" + href: "https://private-33c60-amm3.apiary-mock.com/ledgers/895788", }, operations: { href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908/operations", - templated: true + templated: true, }, effects: { href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908/effects", - templated: true + templated: true, }, precedes: { - href: "https://private-33c60-amm3.apiary-mock.com/transactions?order=asc&cursor=3847380164161536" + href: "https://private-33c60-amm3.apiary-mock.com/transactions?order=asc&cursor=3847380164161536", }, succeeds: { - href: "https://private-33c60-amm3.apiary-mock.com/transactions?order=desc&cursor=3847380164161536" + href: "https://private-33c60-amm3.apiary-mock.com/transactions?order=desc&cursor=3847380164161536", }, transaction: { - href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908" - } + href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908", + }, }, id: "2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908", paging_token: "3847380164161536", @@ -462,11 +462,11 @@ describe("/liquidity_pools tests", function () { "AAAAAgAAAAMADasrAAAAAAAAAAAPBvsNwP2Z/msFScjvzJZtBOdauHdh8iuR6RZc9uVOlAAAAAAa0nQcAA2rKgAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEADassAAAAAAAAAAAPBvsNwP2Z/msFScjvzJZtBOdauHdh8iuR6RZc9uVOlAAAAAAa0k0MAA2rKgAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", memo_type: "none", signatures: [ - "l5kbKF5kYiY1K7W5A2WEZ82nObNQlVeINkZSIASLkLcttZ6c9wNVYVHEpgMfhprMhsVRbyK3HbLU2sCZZsvZBQ==" - ] - } - ] - } + "l5kbKF5kYiY1K7W5A2WEZ82nObNQlVeINkZSIASLkLcttZ6c9wNVYVHEpgMfhprMhsVRbyK3HbLU2sCZZsvZBQ==", + ], + }, + ], + }, }; it("retrieves its transactions", function (done) { @@ -491,28 +491,28 @@ describe("/liquidity_pools tests", function () { const poolEffectsResponse = { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/effects?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/effects?cursor=113725249324879873&limit=10&order=asc", }, next: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/effects?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/effects?cursor=113725249324879873&limit=10&order=asc", }, prev: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/effects?cursor=113725249324879873&limit=10&order=asc" - } + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/ae44a51f6191ce24414fbd1326e93ccb0ae656f07fc1e37602b11d0802f74b9a/effects?cursor=113725249324879873&limit=10&order=asc", + }, }, _embedded: { records: [ { _links: { operation: { - href: "https://private-33c60-amm3.apiary-mock.com/operations/3849085266190337" + href: "https://private-33c60-amm3.apiary-mock.com/operations/3849085266190337", }, succeeds: { - href: "https://private-33c60-amm3.apiary-mock.com/effects?order=desc&cursor=3849085266190337-1" + href: "https://private-33c60-amm3.apiary-mock.com/effects?order=desc&cursor=3849085266190337-1", }, precedes: { - href: "https://private-33c60-amm3.apiary-mock.com/effects?order=asc&cursor=3849085266190337-1" - } + href: "https://private-33c60-amm3.apiary-mock.com/effects?order=asc&cursor=3849085266190337-1", + }, }, id: "0000000012884905986-0000000001", paging_token: "12884905986-2", @@ -530,28 +530,28 @@ describe("/liquidity_pools tests", function () { { amount: "1000.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "2000.0000000", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], }, reserves_deposited: [ { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "983.0000005" + amount: "983.0000005", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2378.0000005" - } + amount: "2378.0000005", + }, ], - shares_received: "1000" + shares_received: "1000", }, { id: "0000000012884905986-0000000002", @@ -570,28 +570,28 @@ describe("/liquidity_pools tests", function () { { amount: "7.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "1.0000000", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], }, reserves_received: [ { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "993.0000005" + amount: "993.0000005", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2478.0000005" - } + amount: "2478.0000005", + }, ], - shares_redeemed: "1000" + shares_redeemed: "1000", }, { id: "0000000012884905986-0000000003", @@ -610,25 +610,25 @@ describe("/liquidity_pools tests", function () { { amount: "1000.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "2000.0000000", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], }, sold: { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "983.0000005" + amount: "983.0000005", }, bought: { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2378.0000005" - } + amount: "2378.0000005", + }, }, { id: "0000000012884905986-0000000004", @@ -647,15 +647,15 @@ describe("/liquidity_pools tests", function () { { amount: "0", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "0", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] - } + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], + }, }, { id: "0000000012884905986-0000000005", @@ -664,7 +664,7 @@ describe("/liquidity_pools tests", function () { type: "liquidity_pool_removed", type_i: 85, created_at: "2021-11-18T03:15:54Z", - liquidity_pool_id: "abcdef" + liquidity_pool_id: "abcdef", }, { id: "0000000012884905986-0000000006", @@ -683,30 +683,30 @@ describe("/liquidity_pools tests", function () { { amount: "7.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "1.0000000", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], }, reserves_revoked: [ { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", amount: "993.0000005", - claimable_balance_id: "cbid1235" + claimable_balance_id: "cbid1235", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", amount: "2478.0000005", - claimable_balance_id: "idcbd1234" - } + claimable_balance_id: "idcbd1234", + }, ], - shares_revoked: "1000" + shares_revoked: "1000", }, { id: "0000000012884905986-0000000007", @@ -717,7 +717,7 @@ describe("/liquidity_pools tests", function () { created_at: "2021-08-04T20:01:24Z", asset_type: "liquidity_pool_shares", liquidity_pool_id: "abcdef", - limit: "1000" + limit: "1000", }, { id: "0000000012884905986-0000000008", @@ -728,7 +728,7 @@ describe("/liquidity_pools tests", function () { created_at: "2021-08-04T20:01:24Z", asset_type: "liquidity_pool_shares", liquidity_pool_id: "abcdef", - limit: "2000" + limit: "2000", }, { id: "0000000012884905986-0000000009", @@ -739,10 +739,10 @@ describe("/liquidity_pools tests", function () { created_at: "2021-08-04T20:01:24Z", asset_type: "liquidity_pool_shares", liquidity_pool_id: "abcdef", - limit: "0.0000000" - } - ] - } + limit: "0.0000000", + }, + ], + }, }; it("retrieves its effects", function (done) { @@ -767,31 +767,31 @@ describe("/liquidity_pools tests", function () { const poolTradesResponse = { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/trades?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/trades?cursor=113725249324879873&limit=10&order=asc", }, next: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/trades?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/trades?cursor=113725249324879873&limit=10&order=asc", }, prev: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/trades?cursor=113725249324879873&limit=10&order=asc" - } + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/trades?cursor=113725249324879873&limit=10&order=asc", + }, }, _embedded: { records: [ { _links: { self: { - href: "" + href: "", }, base: { - href: "https://private-33c60-amm3.apiary-mock.com/accounts/GAVH5JM5OKXGMQDS7YPRJ4MQCPXJUGH26LYQPQJ4SOMOJ4SXY472ZM7G" + href: "https://private-33c60-amm3.apiary-mock.com/accounts/GAVH5JM5OKXGMQDS7YPRJ4MQCPXJUGH26LYQPQJ4SOMOJ4SXY472ZM7G", }, counter: { - href: "https://private-33c60-amm3.apiary-mock.com/accounts/GBB4JST32UWKOLGYYSCEYBHBCOFL2TGBHDVOMZP462ET4ZRD4ULA7S2L" + href: "https://private-33c60-amm3.apiary-mock.com/accounts/GBB4JST32UWKOLGYYSCEYBHBCOFL2TGBHDVOMZP462ET4ZRD4ULA7S2L", }, operation: { - href: "https://private-33c60-amm3.apiary-mock.com/operations/3697472920621057" - } + href: "https://private-33c60-amm3.apiary-mock.com/operations/3697472920621057", + }, }, id: "3697472920621057-0", paging_token: "3697472920621057-0", @@ -813,12 +813,12 @@ describe("/liquidity_pools tests", function () { base_is_seller: true, price: { n: "267", - d: "1000" + d: "1000", }, - trade_type: "liquidity_pool" - } - ] - } + trade_type: "liquidity_pool", + }, + ], + }, }; it("retrieves its trades", function (done) { @@ -848,14 +848,14 @@ describe("/liquidity_pools tests", function () { const poolOpsResponse = { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/operations?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/operations?cursor=113725249324879873&limit=10&order=asc", }, next: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/operations?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/operations?cursor=113725249324879873&limit=10&order=asc", }, prev: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/operations?cursor=113725249324879873&limit=10&order=desc" - } + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/operations?cursor=113725249324879873&limit=10&order=desc", + }, }, _embedded: { records: [ @@ -876,37 +876,37 @@ describe("/liquidity_pools tests", function () { { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "1000.0000005" + amount: "1000.0000005", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "3000.0000005" - } + amount: "3000.0000005", + }, ], min_price: "0.2680000", min_price_r: { n: 67, - d: 250 + d: 250, }, max_price: "0.3680000", max_price_r: { n: 73, - d: 250 + d: 250, }, reserves_deposited: [ { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "983.0000005" + amount: "983.0000005", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2378.0000005" - } + amount: "2378.0000005", + }, ], - shares_received: "1000" + shares_received: "1000", }, { id: "3697472920621057", @@ -924,27 +924,27 @@ describe("/liquidity_pools tests", function () { { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - min: "1000.0000005" + min: "1000.0000005", }, { asset: "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - min: "3000.0000005" - } + min: "3000.0000005", + }, ], shares: "200", reserves_received: [ { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "993.0000005" + amount: "993.0000005", }, { asset: "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2478.0000005" - } - ] + amount: "2478.0000005", + }, + ], }, { id: "157639717969326081", @@ -960,7 +960,7 @@ describe("/liquidity_pools tests", function () { asset_type: "liquidity_pool_shares", liquidity_pool_id: "1", limit: "1000", - trustor: "GBBWI7TEVQBPEUXKYNGI3GBAH7EHFEREONKK3UK56ZSLJIDIYHQJCVSG" + trustor: "GBBWI7TEVQBPEUXKYNGI3GBAH7EHFEREONKK3UK56ZSLJIDIYHQJCVSG", }, { id: "157235845014249474-0", @@ -981,11 +981,11 @@ describe("/liquidity_pools tests", function () { base_is_seller: false, price: { n: "10000000", - d: "899997" - } - } - ] - } + d: "899997", + }, + }, + ], + }, }; it("retrieves its operations", function (done) { @@ -1010,45 +1010,45 @@ describe("/liquidity_pools tests", function () { const poolTxsResponse = { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/transactions?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/transactions?cursor=113725249324879873&limit=10&order=asc", }, next: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/transactions?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/transactions?cursor=113725249324879873&limit=10&order=asc", }, prev: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/transactions?cursor=113725249324879873&limit=10&order=desc" - } + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools/1/transactions?cursor=113725249324879873&limit=10&order=desc", + }, }, _embedded: { records: [ { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908" + href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908", }, account: { - href: "https://private-33c60-amm3.apiary-mock.com/accounts/GAHQN6YNYD6ZT7TLAVE4R36MSZWQJZ22XB3WD4RLSHURMXHW4VHJIDF7" + href: "https://private-33c60-amm3.apiary-mock.com/accounts/GAHQN6YNYD6ZT7TLAVE4R36MSZWQJZ22XB3WD4RLSHURMXHW4VHJIDF7", }, ledger: { - href: "https://private-33c60-amm3.apiary-mock.com/ledgers/895788" + href: "https://private-33c60-amm3.apiary-mock.com/ledgers/895788", }, operations: { href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908/operations", - templated: true + templated: true, }, effects: { href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908/effects", - templated: true + templated: true, }, precedes: { - href: "https://private-33c60-amm3.apiary-mock.com/transactions?order=asc&cursor=3847380164161536" + href: "https://private-33c60-amm3.apiary-mock.com/transactions?order=asc&cursor=3847380164161536", }, succeeds: { - href: "https://private-33c60-amm3.apiary-mock.com/transactions?order=desc&cursor=3847380164161536" + href: "https://private-33c60-amm3.apiary-mock.com/transactions?order=desc&cursor=3847380164161536", }, transaction: { - href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908" - } + href: "https://private-33c60-amm3.apiary-mock.com/transactions/2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908", + }, }, id: "2ff47e1bafe68639276b2a8df0a73597ee0c062fbcc72d121af314fe7851c908", paging_token: "3847380164161536", @@ -1073,11 +1073,11 @@ describe("/liquidity_pools tests", function () { "AAAAAgAAAAMADasrAAAAAAAAAAAPBvsNwP2Z/msFScjvzJZtBOdauHdh8iuR6RZc9uVOlAAAAAAa0nQcAA2rKgAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEADassAAAAAAAAAAAPBvsNwP2Z/msFScjvzJZtBOdauHdh8iuR6RZc9uVOlAAAAAAa0k0MAA2rKgAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", memo_type: "none", signatures: [ - "l5kbKF5kYiY1K7W5A2WEZ82nObNQlVeINkZSIASLkLcttZ6c9wNVYVHEpgMfhprMhsVRbyK3HbLU2sCZZsvZBQ==" - ] - } - ] - } + "l5kbKF5kYiY1K7W5A2WEZ82nObNQlVeINkZSIASLkLcttZ6c9wNVYVHEpgMfhprMhsVRbyK3HbLU2sCZZsvZBQ==", + ], + }, + ], + }, }; it("retrieves its transactions", function (done) { @@ -1102,28 +1102,28 @@ describe("/liquidity_pools tests", function () { const poolFxsResponse = { _links: { self: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc", }, next: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc" + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc", }, prev: { - href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc" - } + href: "https://private-33c60-amm3.apiary-mock.com/liquidity_pools?cursor=113725249324879873&limit=10&order=asc", + }, }, _embedded: { records: [ { _links: { operation: { - href: "https://private-33c60-amm3.apiary-mock.com/operations/3849085266190337" + href: "https://private-33c60-amm3.apiary-mock.com/operations/3849085266190337", }, succeeds: { - href: "https://private-33c60-amm3.apiary-mock.com/effects?order=desc&cursor=3849085266190337-1" + href: "https://private-33c60-amm3.apiary-mock.com/effects?order=desc&cursor=3849085266190337-1", }, precedes: { - href: "https://private-33c60-amm3.apiary-mock.com/effects?order=asc&cursor=3849085266190337-1" - } + href: "https://private-33c60-amm3.apiary-mock.com/effects?order=asc&cursor=3849085266190337-1", + }, }, id: "0000000012884905986-0000000001", paging_token: "12884905986-2", @@ -1141,28 +1141,28 @@ describe("/liquidity_pools tests", function () { { amount: "1000.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "2000.0000000", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], }, reserves_deposited: [ { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "983.0000005" + amount: "983.0000005", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2378.0000005" - } + amount: "2378.0000005", + }, ], - shares_received: "1000" + shares_received: "1000", }, { id: "0000000012884905986-0000000002", @@ -1181,28 +1181,28 @@ describe("/liquidity_pools tests", function () { { amount: "7.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "1.0000000", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], }, reserves_received: [ { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "993.0000005" + amount: "993.0000005", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2478.0000005" - } + amount: "2478.0000005", + }, ], - shares_redeemed: "1000" + shares_redeemed: "1000", }, { id: "0000000012884905986-0000000003", @@ -1221,25 +1221,25 @@ describe("/liquidity_pools tests", function () { { amount: "1000.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "2000.0000000", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], }, sold: { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", - amount: "983.0000005" + amount: "983.0000005", }, bought: { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", - amount: "2378.0000005" - } + amount: "2378.0000005", + }, }, { id: "0000000012884905986-0000000004", @@ -1258,15 +1258,15 @@ describe("/liquidity_pools tests", function () { { amount: "0", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "0", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] - } + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], + }, }, { id: "0000000012884905986-0000000005", @@ -1275,7 +1275,7 @@ describe("/liquidity_pools tests", function () { type: "liquidity_pool_removed", type_i: 85, created_at: "2021-11-18T03:15:54Z", - liquidity_pool_id: "abcdef" + liquidity_pool_id: "abcdef", }, { id: "0000000012884905986-0000000006", @@ -1294,30 +1294,30 @@ describe("/liquidity_pools tests", function () { { amount: "7.0000005", asset: - "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", }, { amount: "1.0000000", asset: - "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ] + "PHP:GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP", + }, + ], }, reserves_revoked: [ { asset: "JPY:GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM", amount: "993.0000005", - claimable_balance_id: "cbid1235" + claimable_balance_id: "cbid1235", }, { asset: "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S", amount: "2478.0000005", - claimable_balance_id: "idcbd1234" - } + claimable_balance_id: "idcbd1234", + }, ], - shares_revoked: "1000" + shares_revoked: "1000", }, { id: "0000000012884905986-0000000007", @@ -1328,7 +1328,7 @@ describe("/liquidity_pools tests", function () { created_at: "2021-08-04T20:01:24Z", asset_type: "liquidity_pool_shares", liquidity_pool_id: "abcdef", - limit: "1000" + limit: "1000", }, { id: "0000000012884905986-0000000008", @@ -1339,7 +1339,7 @@ describe("/liquidity_pools tests", function () { created_at: "2021-08-04T20:01:24Z", asset_type: "liquidity_pool_shares", liquidity_pool_id: "abcdef", - limit: "2000" + limit: "2000", }, { id: "0000000012884905986-0000000009", @@ -1350,10 +1350,10 @@ describe("/liquidity_pools tests", function () { created_at: "2021-08-04T20:01:24Z", asset_type: "liquidity_pool_shares", liquidity_pool_id: "abcdef", - limit: "0.0000000" - } - ] - } + limit: "0.0000000", + }, + ], + }, }; it("retrieves its effects", function (done) { diff --git a/test/unit/server/claimable_balances.js b/test/unit/server/claimable_balances.js index 7d4d694f2..d02b94a66 100644 --- a/test/unit/server/claimable_balances.js +++ b/test/unit/server/claimable_balances.js @@ -18,8 +18,8 @@ describe("ClaimableBalanceCallBuilder", function () { let singleBalanceResponse = { _links: { self: { - href: "horizon-live.stellar.org:1337/claimable_balances/00000000929b20b72e5890ab51c24f1cc46fa01c4f318d8d33367d24dd614cfdf5491072" - } + href: "horizon-live.stellar.org:1337/claimable_balances/00000000929b20b72e5890ab51c24f1cc46fa01c4f318d8d33367d24dd614cfdf5491072", + }, }, id: "00000000929b20b72e5890ab51c24f1cc46fa01c4f318d8d33367d24dd614cfdf5491072", asset: "native", @@ -31,12 +31,12 @@ describe("ClaimableBalanceCallBuilder", function () { destination: "GBVFLWXYCIGPO3455XVFIKHS66FCT5AI64ZARKS7QJN4NF7K5FOXTJNL", predicate: { - unconditional: true - } - } + unconditional: true, + }, + }, ], paging_token: - "38888-00000000929b20b72e5890ab51c24f1cc46fa01c4f318d8d33367d24dd614cfdf5491072" + "38888-00000000929b20b72e5890ab51c24f1cc46fa01c4f318d8d33367d24dd614cfdf5491072", }; this.axiosMock @@ -67,18 +67,18 @@ describe("ClaimableBalanceCallBuilder", function () { const data = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?sponsor=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc" + href: "https://horizon-live.stellar.org:1337/claimable_balances?sponsor=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc", }, next: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?sponsor=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc" + href: "https://horizon-live.stellar.org:1337/claimable_balances?sponsor=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc", }, prev: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?sponsor=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=desc" - } + href: "https://horizon-live.stellar.org:1337/claimable_balances?sponsor=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=desc", + }, }, _embedded: { - records: [] - } + records: [], + }, }; this.axiosMock @@ -108,18 +108,18 @@ describe("ClaimableBalanceCallBuilder", function () { const data = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?claimant=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc" + href: "https://horizon-live.stellar.org:1337/claimable_balances?claimant=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc", }, next: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?claimant=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc" + href: "https://horizon-live.stellar.org:1337/claimable_balances?claimant=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc", }, prev: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?claimant=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=desc" - } + href: "https://horizon-live.stellar.org:1337/claimable_balances?claimant=GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=desc", + }, }, _embedded: { - records: [] - } + records: [], + }, }; this.axiosMock @@ -149,18 +149,18 @@ describe("ClaimableBalanceCallBuilder", function () { const data = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc" + href: "https://horizon-live.stellar.org:1337/claimable_balances?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc", }, next: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc" + href: "https://horizon-live.stellar.org:1337/claimable_balances?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=asc", }, prev: { - href: "https://horizon-live.stellar.org:1337/claimable_balances?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=desc" - } + href: "https://horizon-live.stellar.org:1337/claimable_balances?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD&cursor=&limit=10&order=desc", + }, }, _embedded: { - records: [] - } + records: [], + }, }; this.axiosMock diff --git a/test/unit/server/join_test.js b/test/unit/server/join_test.js index eabc839b1..eee5183c6 100644 --- a/test/unit/server/join_test.js +++ b/test/unit/server/join_test.js @@ -18,28 +18,28 @@ describe("Server - CallBuilder#join", function () { memo: "", _links: { self: { - href: "https://horizon-live.stellar.org:1337/transactions/de8ca055af7972f817e9d3f7c7a0b480de82593bc378f0e48f83b8e31985e4e5" + href: "https://horizon-live.stellar.org:1337/transactions/de8ca055af7972f817e9d3f7c7a0b480de82593bc378f0e48f83b8e31985e4e5", }, account: { - href: "https://horizon-live.stellar.org:1337/accounts/GBIABVWR2LOKFDMAI6QA2NGT4G54O3BC577GAWDQ6QMOUP5E3ULBBGYX" + href: "https://horizon-live.stellar.org:1337/accounts/GBIABVWR2LOKFDMAI6QA2NGT4G54O3BC577GAWDQ6QMOUP5E3ULBBGYX", }, ledger: { - href: "https://horizon-live.stellar.org:1337/ledgers/679846" + href: "https://horizon-live.stellar.org:1337/ledgers/679846", }, operations: { href: "https://horizon-live.stellar.org:1337/transactions/de8ca055af7972f817e9d3f7c7a0b480de82593bc378f0e48f83b8e31985e4e5/operations{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "https://horizon-live.stellar.org:1337/transactions/de8ca055af7972f817e9d3f7c7a0b480de82593bc378f0e48f83b8e31985e4e5/effects{?cursor,limit,order}", - templated: true + templated: true, }, precedes: { - href: "https://horizon-live.stellar.org:1337/transactions?order=asc\u0026cursor=2919916336320512" + href: "https://horizon-live.stellar.org:1337/transactions?order=asc\u0026cursor=2919916336320512", }, succeeds: { - href: "https://horizon-live.stellar.org:1337/transactions?order=desc\u0026cursor=2919916336320512" - } + href: "https://horizon-live.stellar.org:1337/transactions?order=desc\u0026cursor=2919916336320512", + }, }, id: "de8ca055af7972f817e9d3f7c7a0b480de82593bc378f0e48f83b8e31985e4e5", paging_token: "2919916336320512", @@ -63,40 +63,40 @@ describe("Server - CallBuilder#join", function () { "AAAAAgAAAAMAClg5AAAAAAAAAABQANbR0tyijYBHoA000+G7x2wi7/5gWHD0GOo/pN0WEAAAAASoF8gAAAp/SAAAAAAAAAAGAAAAAAAAAAAAAAAAAAsLCwAAAAQAAAABE/EpwLKV4cIOVgnzPs38d/VhMlCerZKJeZrQDItSTxAAAAAWAAAAAVRTwbkj89ksTEv7fZ757ymL+5KMn3TClrUC9W2dyLCmAAAAFQAAAAHSdKqZF3xBOHELun5ttDzJCH1pUyeAT2uJcjcDbEJrEAAAABcAAAAB3oygVa95cvgX6dP3x6C0gN6CWTvDePDkj4O44xmF5OUAAAAYAAAAAAAAAAAAAAABAApfpgAAAAAAAAAAUADW0dLcoo2AR6ANNNPhu8dsIu/+YFhw9BjqP6TdFhAAAAAEqBe58AAKf0gAAAAAAAAABgAAAAAAAAAAAAAAAAALCwsAAAAEAAAAARPxKcCyleHCDlYJ8z7N/Hf1YTJQnq2SiXma0AyLUk8QAAAAFgAAAAFUU8G5I/PZLExL+32e+e8pi/uSjJ90wpa1AvVtnciwpgAAABUAAAAB0nSqmRd8QThxC7p+bbQ8yQh9aVMngE9riXI3A2xCaxAAAAAXAAAAAd6MoFWveXL4F+nT98egtIDeglk7w3jw5I+DuOMZheTlAAAAGAAAAAAAAAAA", memo_type: "text", signatures: [ - "5QcaEgzj+krAtiH0+iRho6gjxWIUMkTfVo28FqoBqlraePffIIDL7TiJN1gMrdZxiBTrsAJvpRqoJtmjEjL8AQ==" - ] + "5QcaEgzj+krAtiH0+iRho6gjxWIUMkTfVo28FqoBqlraePffIIDL7TiJN1gMrdZxiBTrsAJvpRqoJtmjEjL8AQ==", + ], }; const operationsResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/operations?cursor=\u0026join=transactions\u0026limit=10\u0026order=asc" + href: "https://horizon-live.stellar.org:1337/operations?cursor=\u0026join=transactions\u0026limit=10\u0026order=asc", }, next: { - href: "https://horizon-live.stellar.org:1337/operations?cursor=2919916336320518\u0026join=transactions\u0026limit=10\u0026order=asc" + href: "https://horizon-live.stellar.org:1337/operations?cursor=2919916336320518\u0026join=transactions\u0026limit=10\u0026order=asc", }, prev: { - href: "https://horizon-live.stellar.org:1337/operations?cursor=2919916336320518\u0026join=transactions\u0026limit=1\u0026order=asc" - } + href: "https://horizon-live.stellar.org:1337/operations?cursor=2919916336320518\u0026join=transactions\u0026limit=1\u0026order=asc", + }, }, _embedded: { records: [ { _links: { self: { - href: "https://horizon-live.stellar.org:1337/operations/2919916336320518" + href: "https://horizon-live.stellar.org:1337/operations/2919916336320518", }, transaction: { - href: "https://horizon-live.stellar.org:1337/transactions/de8ca055af7972f817e9d3f7c7a0b480de82593bc378f0e48f83b8e31985e4e5" + href: "https://horizon-live.stellar.org:1337/transactions/de8ca055af7972f817e9d3f7c7a0b480de82593bc378f0e48f83b8e31985e4e5", }, effects: { - href: "https://horizon-live.stellar.org:1337/operations/2919916336320518/effects" + href: "https://horizon-live.stellar.org:1337/operations/2919916336320518/effects", }, succeeds: { - href: "https://horizon-live.stellar.org:1337/effects?order=desc\u0026cursor=2919916336320518" + href: "https://horizon-live.stellar.org:1337/effects?order=desc\u0026cursor=2919916336320518", }, precedes: { - href: "https://horizon-live.stellar.org:1337/effects?order=asc\u0026cursor=2919916336320518" - } + href: "https://horizon-live.stellar.org:1337/effects?order=asc\u0026cursor=2919916336320518", + }, }, id: "2919916336320518", paging_token: "2919916336320518", @@ -121,24 +121,24 @@ describe("Server - CallBuilder#join", function () { asset_type: "credit_alphanum4", asset_code: "USD", asset_issuer: - "GBXGR3C3VKWAJCWLF7LX5TLS4KWQKPKJ4KUOJ6T6NEBROA62TTUUM6GD" + "GBXGR3C3VKWAJCWLF7LX5TLS4KWQKPKJ4KUOJ6T6NEBROA62TTUUM6GD", }, { asset_type: "credit_alphanum4", asset_code: "USD", asset_issuer: - "GBXGR3C3VKWAJCWLF7LX5TLS4KWQKPKJ4KUOJ6T6NEBROA62TTUUM6GD" - } + "GBXGR3C3VKWAJCWLF7LX5TLS4KWQKPKJ4KUOJ6T6NEBROA62TTUUM6GD", + }, ], source_amount: "10000.0000000", source_max: "10000.0000000", source_asset_type: "credit_alphanum4", source_asset_code: "USD", source_asset_issuer: - "GBXGR3C3VKWAJCWLF7LX5TLS4KWQKPKJ4KUOJ6T6NEBROA62TTUUM6GD" - } - ] - } + "GBXGR3C3VKWAJCWLF7LX5TLS4KWQKPKJ4KUOJ6T6NEBROA62TTUUM6GD", + }, + ], + }, }; it("loads resources in join and avoids extra call to server", function (done) { diff --git a/test/unit/server_check_memo_required_test.js b/test/unit/server_check_memo_required_test.js index 10c00b9e9..017594f9a 100644 --- a/test/unit/server_check_memo_required_test.js +++ b/test/unit/server_check_memo_required_test.js @@ -2,7 +2,7 @@ function buildTransaction(destination, operations = [], builderOpts = {}) { let txBuilderOpts = { fee: 100, networkPassphrase: StellarSdk.Networks.TESTNET, - v1: true + v1: true, }; Object.assign(txBuilderOpts, builderOpts); let keypair = StellarSdk.Keypair.random(); @@ -14,7 +14,7 @@ function buildTransaction(destination, operations = [], builderOpts = {}) { StellarSdk.Operation.payment({ destination: destination, asset: StellarSdk.Asset.native(), - amount: "100.50" + amount: "100.50", }) ); @@ -40,8 +40,8 @@ function buildAccount(id, data = {}) { _links: { data: { href: `https://horizon-testnet.stellar.org/accounts/${id}/data/{key}`, - templated: true - } + templated: true, + }, }, id: id, account_id: id, @@ -51,29 +51,29 @@ function buildAccount(id, data = {}) { thresholds: { low_threshold: 0, med_threshold: 0, - high_threshold: 0 + high_threshold: 0, }, flags: { auth_required: false, auth_revocable: false, - auth_immutable: false + auth_immutable: false, }, balances: [ { balance: "9999.9999900", buying_liabilities: "0.0000000", selling_liabilities: "0.0000000", - asset_type: "native" - } + asset_type: "native", + }, ], signers: [ { weight: 1, key: id, - type: "ed25519_public_key" - } + type: "ed25519_public_key", + }, ], - data: data + data: data, }; } @@ -83,12 +83,12 @@ function mockAccountRequest(axiosMock, id, status, data = {}) { switch (status) { case 404: response = Promise.reject({ - response: { status: 404, statusText: "NotFound", data: {} } + response: { status: 404, statusText: "NotFound", data: {} }, }); break; case 400: response = Promise.reject({ - response: { status: 400, statusText: "BadRequestError", data: {} } + response: { status: 400, statusText: "BadRequestError", data: {} }, }); break; default: @@ -117,7 +117,7 @@ describe("server.js check-memo-required", function () { it("fails if memo is required", function (done) { let accountId = "GAYHAAKPAQLMGIJYMIWPDWCGUCQ5LAWY4Q7Q3IKSP57O7GUPD3NEOSEA"; mockAccountRequest(this.axiosMock, accountId, 200, { - "config.memo_required": "MQ==" + "config.memo_required": "MQ==", }); let transaction = buildTransaction(accountId); @@ -142,7 +142,7 @@ describe("server.js check-memo-required", function () { it("fee bump - fails if memo is required", function (done) { let accountId = "GAYHAAKPAQLMGIJYMIWPDWCGUCQ5LAWY4Q7Q3IKSP57O7GUPD3NEOSEA"; mockAccountRequest(this.axiosMock, accountId, 200, { - "config.memo_required": "MQ==" + "config.memo_required": "MQ==", }); let transaction = buildTransaction(accountId, [], { feeBump: true }); @@ -223,8 +223,8 @@ describe("server.js check-memo-required", function () { StellarSdk.Operation.payment({ destination: accountId, asset: StellarSdk.Asset.native(), - amount: "100.50" - }) + amount: "100.50", + }), ]; let transaction = buildTransaction(accountId, operations); @@ -246,7 +246,7 @@ describe("server.js check-memo-required", function () { const destinations = [ "GASGNGGXDNJE5C2O7LDCATIVYSSTZKB24SHYS6F4RQT4M4IGNYXB4TIV", "GBBM6BKZPEHWYO3E3YKREDPQXMS4VK35YLNU7NFBRI26RAN7GI5POFBB", - "GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ" + "GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ", ]; const usd = new StellarSdk.Asset( @@ -261,7 +261,7 @@ describe("server.js check-memo-required", function () { let operations = [ StellarSdk.Operation.accountMerge({ - destination: destinations[0] + destination: destinations[0], }), StellarSdk.Operation.pathPaymentStrictReceive({ sendAsset: StellarSdk.Asset.native(), @@ -269,7 +269,7 @@ describe("server.js check-memo-required", function () { destination: destinations[1], destAsset: StellarSdk.Asset.native(), destAmount: "5.50", - path: [usd, eur] + path: [usd, eur], }), StellarSdk.Operation.pathPaymentStrictSend({ sendAsset: StellarSdk.Asset.native(), @@ -277,14 +277,14 @@ describe("server.js check-memo-required", function () { destination: destinations[2], destAsset: StellarSdk.Asset.native(), destMin: "5.50", - path: [usd, eur] + path: [usd, eur], }), StellarSdk.Operation.changeTrust({ - asset: usd + asset: usd, }), StellarSdk.Operation.changeTrust({ - asset: liquidityPoolAsset - }) + asset: liquidityPoolAsset, + }), ]; destinations.forEach((d) => mockAccountRequest(this.axiosMock, d, 200, {})); diff --git a/test/unit/server_test.js b/test/unit/server_test.js index 9467001e3..168aee093 100644 --- a/test/unit/server_test.js +++ b/test/unit/server_test.js @@ -25,7 +25,7 @@ describe("server.js non-transaction tests", function () { expect( () => new StellarSdk.Server("http://horizon-live.stellar.org:1337", { - allowHttp: true + allowHttp: true, }) ).to.not.throw(); }); @@ -80,7 +80,7 @@ describe("server.js non-transaction tests", function () { 200, {}, { - date: "Wed, 13 Mar 2019 22:15:07 GMT" + date: "Wed, 13 Mar 2019 22:15:07 GMT", } ); @@ -90,7 +90,7 @@ describe("server.js non-transaction tests", function () { expect(serverTime).to.eql({ minTime: 0, // this is server time 1552515307 plus 20 - maxTime: 1552515327 + maxTime: 1552515327, }); done(); @@ -120,7 +120,7 @@ describe("server.js non-transaction tests", function () { p80: "2000", p90: "2000", p95: "2000", - p99: "2000" + p99: "2000", }, fee_charged: { min: "100", @@ -136,8 +136,8 @@ describe("server.js non-transaction tests", function () { p80: "100", p90: "100", p95: "100", - p99: "100" - } + p99: "100", + }, }; it("returns the base reserve", function (done) { @@ -198,7 +198,7 @@ describe("server.js non-transaction tests", function () { p80: "2000", p90: "2000", p95: "2000", - p99: "2000" + p99: "2000", }, fee_charged: { min: "100", @@ -214,8 +214,8 @@ describe("server.js non-transaction tests", function () { p80: "100", p90: "100", p95: "100", - p99: "100" - } + p99: "100", + }, }; it("returns the base reserve", function (done) { @@ -367,19 +367,19 @@ describe("server.js non-transaction tests", function () { _links: { effects: { href: "/ledgers/1/effects{?cursor,limit,order}", - templated: true + templated: true, }, operations: { href: "/ledgers/1/operations{?cursor,limit,order}", - templated: true + templated: true, }, self: { - href: "/ledgers/1" + href: "/ledgers/1", }, transactions: { href: "/ledgers/1/transactions{?cursor,limit,order}", - templated: true - } + templated: true, + }, }, id: "63d98f536ee68d1b27b5b89f23af5311b7569a24faf1403ad0b52b633b07be99", paging_token: "4294967296", @@ -388,21 +388,21 @@ describe("server.js non-transaction tests", function () { transaction_count: 0, operation_count: 0, tx_set_operation_count: 0, - closed_at: "1970-01-01T00:00:00Z" - } - ] + closed_at: "1970-01-01T00:00:00Z", + }, + ], }, _links: { next: { - href: "/ledgers?order=asc\u0026limit=1\u0026cursor=4294967296" + href: "/ledgers?order=asc\u0026limit=1\u0026cursor=4294967296", }, prev: { - href: "/ledgers?order=desc\u0026limit=1\u0026cursor=4294967296" + href: "/ledgers?order=desc\u0026limit=1\u0026cursor=4294967296", }, self: { - href: "/ledgers?order=asc\u0026limit=1\u0026cursor=" - } - } + href: "/ledgers?order=asc\u0026limit=1\u0026cursor=", + }, + }, }; describe("without options", function () { @@ -495,19 +495,19 @@ describe("server.js non-transaction tests", function () { _links: { effects: { href: "/ledgers/1/effects{?cursor,limit,order}", - templated: true + templated: true, }, operations: { href: "/ledgers/1/operations{?cursor,limit,order}", - templated: true + templated: true, }, self: { - href: "/ledgers/1" + href: "/ledgers/1", }, transactions: { href: "/ledgers/1/transactions{?cursor,limit,order}", - templated: true - } + templated: true, + }, }, id: "63d98f536ee68d1b27b5b89f23af5311b7569a24faf1403ad0b52b633b07be99", paging_token: "4294967296", @@ -516,7 +516,7 @@ describe("server.js non-transaction tests", function () { transaction_count: 0, operation_count: 0, tx_set_operation_count: 0, - closed_at: "1970-01-01T00:00:00Z" + closed_at: "1970-01-01T00:00:00Z", }; describe("for a non existent ledger", function () { @@ -528,7 +528,7 @@ describe("server.js non-transaction tests", function () { ) .returns( Promise.reject({ - response: { status: 404, statusText: "NotFound", data: {} } + response: { status: 404, statusText: "NotFound", data: {} }, }) ); @@ -604,42 +604,42 @@ describe("server.js non-transaction tests", function () { let transactionsResponse = { _links: { self: { - href: "https://horizon.stellar.org/transactions?order=desc\u0026limit=1\u0026cursor=" + href: "https://horizon.stellar.org/transactions?order=desc\u0026limit=1\u0026cursor=", }, next: { - href: "https://horizon.stellar.org/transactions?order=desc\u0026limit=1\u0026cursor=34156680904183808" + href: "https://horizon.stellar.org/transactions?order=desc\u0026limit=1\u0026cursor=34156680904183808", }, prev: { - href: "https://horizon.stellar.org/transactions?order=asc\u0026limit=1\u0026cursor=34156680904183808" - } + href: "https://horizon.stellar.org/transactions?order=asc\u0026limit=1\u0026cursor=34156680904183808", + }, }, _embedded: { records: [ { _links: { self: { - href: "https://horizon.stellar.org/transactions/c585b8764b28be678c482f8b6e87e76e4b5f28043c53f4dcb7b724b4b2efebc1" + href: "https://horizon.stellar.org/transactions/c585b8764b28be678c482f8b6e87e76e4b5f28043c53f4dcb7b724b4b2efebc1", }, account: { - href: "https://horizon.stellar.org/accounts/GBURK32BMC7XORYES62HDKY7VTA5MO7JYBDH7KTML4EPN4BV2MIRQOVR" + href: "https://horizon.stellar.org/accounts/GBURK32BMC7XORYES62HDKY7VTA5MO7JYBDH7KTML4EPN4BV2MIRQOVR", }, ledger: { - href: "https://horizon.stellar.org/ledgers/7952722" + href: "https://horizon.stellar.org/ledgers/7952722", }, operations: { href: "https://horizon.stellar.org/transactions/c585b8764b28be678c482f8b6e87e76e4b5f28043c53f4dcb7b724b4b2efebc1/operations{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "https://horizon.stellar.org/transactions/c585b8764b28be678c482f8b6e87e76e4b5f28043c53f4dcb7b724b4b2efebc1/effects{?cursor,limit,order}", - templated: true + templated: true, }, precedes: { - href: "https://horizon.stellar.org/transactions?order=asc\u0026cursor=34156680904183808" + href: "https://horizon.stellar.org/transactions?order=asc\u0026cursor=34156680904183808", }, succeeds: { - href: "https://horizon.stellar.org/transactions?order=desc\u0026cursor=34156680904183808" - } + href: "https://horizon.stellar.org/transactions?order=desc\u0026cursor=34156680904183808", + }, }, id: "c585b8764b28be678c482f8b6e87e76e4b5f28043c53f4dcb7b724b4b2efebc1", paging_token: "34156680904183808", @@ -662,11 +662,11 @@ describe("server.js non-transaction tests", function () { "AAAAAgAAAAMAeVZcAAAAAAAAAABpFW9BYL93RwSXtHGrH6zB1jvpwEZ/qmxfCPbwNdMRGAAAABc+8zU9AFsPtQAABXYAAAASAAAAAAAAAAAAAAAPZnVudHJhY2tlci5zaXRlAAEAAAAAAAAAAAAAAAAAAAAAAAABAHlZUgAAAAAAAAAAaRVvQWC/d0cEl7Rxqx+swdY76cBGf6psXwj28DXTERgAAAAXPvMzrQBbD7UAAAV3AAAAEgAAAAAAAAAAAAAAD2Z1bnRyYWNrZXIuc2l0ZQABAAAAAAAAAAAAAAAAAAAA", memo_type: "none", signatures: [ - "pox1kE2/f2oYQw/PdJZHUk74JVWRHDPwcqzGP+lSJljl6ABBRPqXewP1jAzpgY+vicDeLR/35/HyDyeAG7H0Aw==" - ] - } - ] - } + "pox1kE2/f2oYQw/PdJZHUk74JVWRHDPwcqzGP+lSJljl6ABBRPqXewP1jAzpgY+vicDeLR/35/HyDyeAG7H0Aw==", + ], + }, + ], + }, }; describe("without options", function () { @@ -775,8 +775,8 @@ describe("server.js non-transaction tests", function () { _links: { test: function () { return "hi"; - } - } + }, + }, }); expect(typeof json.test).to.be.equal("function"); }); @@ -788,28 +788,28 @@ describe("server.js non-transaction tests", function () { let singleTranssactionResponse = { _links: { self: { - href: "https://horizon-testnet.stellar.org/transactions/6bbd8cbd90498a26210a21ec599702bead8f908f412455da300318aba36831b0" + href: "https://horizon-testnet.stellar.org/transactions/6bbd8cbd90498a26210a21ec599702bead8f908f412455da300318aba36831b0", }, account: { - href: "https://horizon-testnet.stellar.org/accounts/GBCCHT5P34DMK2LTN4SPHBAJCXYFNUEWSM7SDSWEXJA7NN6CA3HNHTM6" + href: "https://horizon-testnet.stellar.org/accounts/GBCCHT5P34DMK2LTN4SPHBAJCXYFNUEWSM7SDSWEXJA7NN6CA3HNHTM6", }, ledger: { - href: "https://horizon-testnet.stellar.org/ledgers/121879" + href: "https://horizon-testnet.stellar.org/ledgers/121879", }, operations: { href: "https://horizon-testnet.stellar.org/transactions/6bbd8cbd90498a26210a21ec599702bead8f908f412455da300318aba36831b0/operations{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "https://horizon-testnet.stellar.org/transactions/6bbd8cbd90498a26210a21ec599702bead8f908f412455da300318aba36831b0/effects{?cursor,limit,order}", - templated: true + templated: true, }, precedes: { - href: "https://horizon-testnet.stellar.org/transactions?order=asc&cursor=523466319077376" + href: "https://horizon-testnet.stellar.org/transactions?order=asc&cursor=523466319077376", }, succeeds: { - href: "https://horizon-testnet.stellar.org/transactions?order=desc&cursor=523466319077376" - } + href: "https://horizon-testnet.stellar.org/transactions?order=desc&cursor=523466319077376", + }, }, id: "6bbd8cbd90498a26210a21ec599702bead8f908f412455da300318aba36831b0", paging_token: "523466319077376", @@ -833,8 +833,8 @@ describe("server.js non-transaction tests", function () { "AAAAAgAAAAMAAdwUAAAAAAAAAABEI8+v3wbFaXNvJPOECRXwVtCWkz8hysS6Qfa3wgbO0wAAABbRQVJwAAHcCQAAAAQAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAdwXAAAAAAAAAABEI8+v3wbFaXNvJPOECRXwVtCWkz8hysS6Qfa3wgbO0wAAABbRQVIMAAHcCQAAAAQAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", memo_type: "none", signatures: [ - "pfzlCzxO0N4pJsCGHhAhbcVR+K4fJZpOOuUCyHhxHhHG2IWk34H3vFQMCrGH+GKivmCokoiNAaiSg6+gniN0CQ==" - ] + "pfzlCzxO0N4pJsCGHhAhbcVR+K4fJZpOOuUCyHhxHhHG2IWk34H3vFQMCrGH+GKivmCokoiNAaiSg6+gniN0CQ==", + ], }; this.axiosMock @@ -864,14 +864,14 @@ describe("server.js non-transaction tests", function () { const transactionsResponse = { _links: { self: { - href: "https://horizon.stellar.org/transactions?cursor=\u0026limit=3\u0026order=asc" + href: "https://horizon.stellar.org/transactions?cursor=\u0026limit=3\u0026order=asc", }, next: { - href: "https://horizon.stellar.org/transactions?cursor=33736968114176\u0026limit=3\u0026order=asc" + href: "https://horizon.stellar.org/transactions?cursor=33736968114176\u0026limit=3\u0026order=asc", }, prev: { - href: "https://horizon.stellar.org/transactions?cursor=12884905984\u0026limit=3\u0026order=desc" - } + href: "https://horizon.stellar.org/transactions?cursor=12884905984\u0026limit=3\u0026order=desc", + }, }, _embedded: { records: [ @@ -879,28 +879,28 @@ describe("server.js non-transaction tests", function () { memo: "hello world", _links: { self: { - href: "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889" + href: "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889", }, account: { - href: "https://horizon.stellar.org/accounts/GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7" + href: "https://horizon.stellar.org/accounts/GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7", }, ledger: { - href: "https://horizon.stellar.org/ledgers/3" + href: "https://horizon.stellar.org/ledgers/3", }, operations: { href: "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889/operations{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889/effects{?cursor,limit,order}", - templated: true + templated: true, }, precedes: { - href: "https://horizon.stellar.org/transactions?order=asc\u0026cursor=12884905984" + href: "https://horizon.stellar.org/transactions?order=asc\u0026cursor=12884905984", }, succeeds: { - href: "https://horizon.stellar.org/transactions?order=desc\u0026cursor=12884905984" - } + href: "https://horizon.stellar.org/transactions?order=desc\u0026cursor=12884905984", + }, }, id: "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889", paging_token: "12884905984", @@ -924,35 +924,35 @@ describe("server.js non-transaction tests", function () { "AAAAAgAAAAMAAAABAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQ3gtrOnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQ3gtrOnY/7UAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", memo_type: "text", signatures: [ - "SsKlst02jsaBp35vXlI300Qbz39+HbwwNDX/gfM+MwaG/dFF7bgqpkKsDAsh/qJDiN3NOW695IZB9Mj+JAsHBA==" - ] + "SsKlst02jsaBp35vXlI300Qbz39+HbwwNDX/gfM+MwaG/dFF7bgqpkKsDAsh/qJDiN3NOW695IZB9Mj+JAsHBA==", + ], }, { memo: "testpool,faucet,sdf", _links: { self: { - href: "https://horizon.stellar.org/transactions/2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a" + href: "https://horizon.stellar.org/transactions/2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a", }, account: { - href: "https://horizon.stellar.org/accounts/GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB" + href: "https://horizon.stellar.org/accounts/GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB", }, ledger: { - href: "https://horizon.stellar.org/ledgers/7841" + href: "https://horizon.stellar.org/ledgers/7841", }, operations: { href: "https://horizon.stellar.org/transactions/2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a/operations{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "https://horizon.stellar.org/transactions/2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a/effects{?cursor,limit,order}", - templated: true + templated: true, }, precedes: { - href: "https://horizon.stellar.org/transactions?order=asc\u0026cursor=33676838572032" + href: "https://horizon.stellar.org/transactions?order=asc\u0026cursor=33676838572032", }, succeeds: { - href: "https://horizon.stellar.org/transactions?order=desc\u0026cursor=33676838572032" - } + href: "https://horizon.stellar.org/transactions?order=desc\u0026cursor=33676838572032", + }, }, id: "2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a", paging_token: "33676838572032", @@ -976,35 +976,35 @@ describe("server.js non-transaction tests", function () { "AAAAAgAAAAMAAB55AAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNg3gtrObeDuoAAAAAwAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAB6hAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNg3gtrObeDp8AAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", memo_type: "text", signatures: [ - "NIEHl40QqRYihBtnVhBpsm4TmZb8AqGsdPHD0feb+xqL3RhxpmWwB7e5472MTGNJkXbz1lxHi9zTAXDWn9bIBw==" - ] + "NIEHl40QqRYihBtnVhBpsm4TmZb8AqGsdPHD0feb+xqL3RhxpmWwB7e5472MTGNJkXbz1lxHi9zTAXDWn9bIBw==", + ], }, { memo: "", _links: { self: { - href: "https://horizon.stellar.org/transactions/3ce2aca2fed36da2faea31352c76c5e412348887a4c119b1e90de8d1b937396a" + href: "https://horizon.stellar.org/transactions/3ce2aca2fed36da2faea31352c76c5e412348887a4c119b1e90de8d1b937396a", }, account: { - href: "https://horizon.stellar.org/accounts/GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB" + href: "https://horizon.stellar.org/accounts/GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB", }, ledger: { - href: "https://horizon.stellar.org/ledgers/7855" + href: "https://horizon.stellar.org/ledgers/7855", }, operations: { href: "https://horizon.stellar.org/transactions/3ce2aca2fed36da2faea31352c76c5e412348887a4c119b1e90de8d1b937396a/operations{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "https://horizon.stellar.org/transactions/3ce2aca2fed36da2faea31352c76c5e412348887a4c119b1e90de8d1b937396a/effects{?cursor,limit,order}", - templated: true + templated: true, }, precedes: { - href: "https://horizon.stellar.org/transactions?order=asc\u0026cursor=33736968114176" + href: "https://horizon.stellar.org/transactions?order=asc\u0026cursor=33736968114176", }, succeeds: { - href: "https://horizon.stellar.org/transactions?order=desc\u0026cursor=33736968114176" - } + href: "https://horizon.stellar.org/transactions?order=desc\u0026cursor=33736968114176", + }, }, id: "3ce2aca2fed36da2faea31352c76c5e412348887a4c119b1e90de8d1b937396a", paging_token: "33736968114176", @@ -1027,11 +1027,11 @@ describe("server.js non-transaction tests", function () { "AAAAAgAAAAMAAB6hAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNg3gtrN3tPR8AAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAB6vAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNg3gtrN3tPQYAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", memo_type: "text", signatures: [ - "1sNxaxHezfPxDOpq1x1z+TYvgtdYkwDp5dpzx1teQB1zimkfbmKwYLk7C8bTpXC9zcJ7f+vathwE/e/GHHXwDw==" - ] - } - ] - } + "1sNxaxHezfPxDOpq1x1z+TYvgtdYkwDp5dpzx1teQB1zimkfbmKwYLk7C8bTpXC9zcJ7f+vathwE/e/GHHXwDw==", + ], + }, + ], + }, }; it("forClaimableBalance() requests the correct endpoint", function (done) { @@ -1070,23 +1070,23 @@ describe("server.js non-transaction tests", function () { _links: { effects: { href: "/accounts/GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K/effects{?cursor,limit,order}", - templated: true + templated: true, }, offers: { href: "/accounts/GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K/offers{?cursor,limit,order}", - templated: true + templated: true, }, operations: { href: "/accounts/GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K/operations{?cursor,limit,order}", - templated: true + templated: true, }, self: { - href: "/accounts/GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K" + href: "/accounts/GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K", }, transactions: { href: "/accounts/GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K/transactions{?cursor,limit,order}", - templated: true - } + templated: true, + }, }, id: "GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K", paging_token: "146028892161", @@ -1099,27 +1099,27 @@ describe("server.js non-transaction tests", function () { thresholds: { low_threshold: 0, med_threshold: 0, - high_threshold: 0 + high_threshold: 0, }, flags: { auth_required: false, auth_revocable: false, auth_immutable: false, - auth_clawback_enabled: false + auth_clawback_enabled: false, }, balances: [ { asset_type: "native", - balance: "9760000.3997400" - } + balance: "9760000.3997400", + }, ], signers: [ { public_key: "GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K", - weight: 1 - } - ] + weight: 1, + }, + ], }; this.axiosMock @@ -1148,50 +1148,50 @@ describe("server.js non-transaction tests", function () { let accountsForSignerResponse = { _links: { self: { - href: "/accounts?cursor=&limit=10&order=asc&signer=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" + href: "/accounts?cursor=&limit=10&order=asc&signer=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", }, next: { - href: "/accounts?cursor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42&limit=10&order=asc&signer=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" + href: "/accounts?cursor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42&limit=10&order=asc&signer=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", }, prev: { - href: "/accounts?cursor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42&limit=10&order=desc&signer=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" - } + href: "/accounts?cursor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42&limit=10&order=desc&signer=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", + }, }, _embedded: { records: [ { _links: { self: { - href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" + href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", }, transactions: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/transactions{?cursor,limit,order}", - templated: true + templated: true, }, operations: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/operations{?cursor,limit,order}", - templated: true + templated: true, }, payments: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/payments{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/effects{?cursor,limit,order}", - templated: true + templated: true, }, offers: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/offers{?cursor,limit,order}", - templated: true + templated: true, }, trades: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/trades{?cursor,limit,order}", - templated: true + templated: true, }, data: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/data/{key}", - templated: true - } + templated: true, + }, }, id: "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", account_id: @@ -1203,13 +1203,13 @@ describe("server.js non-transaction tests", function () { thresholds: { low_threshold: 0, med_threshold: 0, - high_threshold: 0 + high_threshold: 0, }, flags: { auth_required: false, auth_revocable: false, auth_immutable: false, - auth_clawback_enabled: false + auth_clawback_enabled: false, }, balances: [ { @@ -1222,28 +1222,28 @@ describe("server.js non-transaction tests", function () { asset_type: "credit_alphanum4", asset_code: "USD", asset_issuer: - "GDUEG67IE5TJUVWRRTMXDP3Q6EMMZJ6HL5OMWLBYOIUIZEUW2T2PBPJH" + "GDUEG67IE5TJUVWRRTMXDP3Q6EMMZJ6HL5OMWLBYOIUIZEUW2T2PBPJH", }, { balance: "9999.9999900", buying_liabilities: "0.0000000", selling_liabilities: "0.0000000", - asset_type: "native" - } + asset_type: "native", + }, ], signers: [ { weight: 1, key: "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", - type: "ed25519_public_key" - } + type: "ed25519_public_key", + }, ], data: {}, paging_token: - "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" - } - ] - } + "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", + }, + ], + }, }; this.axiosMock @@ -1276,50 +1276,50 @@ describe("server.js non-transaction tests", function () { let accountsForAssetResponse = { _links: { self: { - href: "/accounts?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD\u0026cursor=\u0026limit=10\u0026order=asc" + href: "/accounts?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD\u0026cursor=\u0026limit=10\u0026order=asc", }, next: { - href: "/accounts?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD\u0026cursor=GC4J73PTB5WN7MOJWOAECPHRCV2UU3WCY37L3BNY6RZVKE23JGQYJMJ6\u0026limit=10\u0026order=asc" + href: "/accounts?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD\u0026cursor=GC4J73PTB5WN7MOJWOAECPHRCV2UU3WCY37L3BNY6RZVKE23JGQYJMJ6\u0026limit=10\u0026order=asc", }, prev: { - href: "/accounts?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD\u0026cursor=GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667\u0026limit=10\u0026order=desc" - } + href: "/accounts?asset=USD%3AGDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD\u0026cursor=GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667\u0026limit=10\u0026order=desc", + }, }, _embedded: { records: [ { _links: { self: { - href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667" + href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667", }, transactions: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/transactions{?cursor,limit,order}", - templated: true + templated: true, }, operations: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/operations{?cursor,limit,order}", - templated: true + templated: true, }, payments: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/payments{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/effects{?cursor,limit,order}", - templated: true + templated: true, }, offers: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/offers{?cursor,limit,order}", - templated: true + templated: true, }, trades: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/trades{?cursor,limit,order}", - templated: true + templated: true, }, data: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/data/{key}", - templated: true - } + templated: true, + }, }, id: "GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667", account_id: @@ -1331,13 +1331,13 @@ describe("server.js non-transaction tests", function () { thresholds: { low_threshold: 0, med_threshold: 0, - high_threshold: 0 + high_threshold: 0, }, flags: { auth_required: false, auth_revocable: false, auth_immutable: false, - auth_clawback_enabled: false + auth_clawback_enabled: false, }, balances: [ { @@ -1350,28 +1350,28 @@ describe("server.js non-transaction tests", function () { asset_type: "credit_alphanum4", asset_code: "USD", asset_issuer: - "GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD" + "GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD", }, { balance: "9999.9998600", buying_liabilities: "0.0000000", selling_liabilities: "0.0000000", - asset_type: "native" - } + asset_type: "native", + }, ], signers: [ { weight: 1, key: "GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667", - type: "ed25519_public_key" - } + type: "ed25519_public_key", + }, ], data: {}, paging_token: - "GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667" - } - ] - } + "GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667", + }, + ], + }, }; this.axiosMock @@ -1409,50 +1409,50 @@ describe("server.js non-transaction tests", function () { let accountsForSponsor = { _links: { self: { - href: "/accounts?cursor=&limit=10&order=asc&sponsor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" + href: "/accounts?cursor=&limit=10&order=asc&sponsor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", }, next: { - href: "/accounts?cursor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42&limit=10&order=asc&sponsor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" + href: "/accounts?cursor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42&limit=10&order=asc&sponsor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", }, prev: { - href: "/accounts?cursor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42&limit=10&order=desc&sponsor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" - } + href: "/accounts?cursor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42&limit=10&order=desc&sponsor=GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", + }, }, _embedded: { records: [ { _links: { self: { - href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" + href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", }, transactions: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/transactions{?cursor,limit,order}", - templated: true + templated: true, }, operations: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/operations{?cursor,limit,order}", - templated: true + templated: true, }, payments: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/payments{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/effects{?cursor,limit,order}", - templated: true + templated: true, }, offers: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/offers{?cursor,limit,order}", - templated: true + templated: true, }, trades: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/trades{?cursor,limit,order}", - templated: true + templated: true, }, data: { href: "/accounts/GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42/data/{key}", - templated: true - } + templated: true, + }, }, id: "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", account_id: @@ -1464,13 +1464,13 @@ describe("server.js non-transaction tests", function () { thresholds: { low_threshold: 0, med_threshold: 0, - high_threshold: 0 + high_threshold: 0, }, flags: { auth_required: false, auth_revocable: false, auth_immutable: false, - auth_clawback_enabled: false + auth_clawback_enabled: false, }, balances: [ { @@ -1485,30 +1485,30 @@ describe("server.js non-transaction tests", function () { asset_issuer: "GDUEG67IE5TJUVWRRTMXDP3Q6EMMZJ6HL5OMWLBYOIUIZEUW2T2PBPJH", sponsor: - "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42" + "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", }, { balance: "9999.9999900", buying_liabilities: "0.0000000", selling_liabilities: "0.0000000", - asset_type: "native" - } + asset_type: "native", + }, ], signers: [ { weight: 1, key: "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", - type: "ed25519_public_key" - } + type: "ed25519_public_key", + }, ], data: {}, paging_token: "GBCR5OVQ54S2EKHLBZMK6VYMTXZHXN3T45Y6PRX4PX4FXDMJJGY4FD42", num_sponsoring: 0, - num_sponsored: 3 - } - ] - } + num_sponsored: 3, + }, + ], + }, }; this.axiosMock @@ -1541,50 +1541,50 @@ describe("server.js non-transaction tests", function () { const accountsForAssetResponse = { _links: { self: { - href: "/accounts?liquidity_pool=dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7&cursor=&limit=10&order=asc" + href: "/accounts?liquidity_pool=dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7&cursor=&limit=10&order=asc", }, next: { - href: "/accounts?liquidity_pool=dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7&cursor=GC4J73PTB5WN7MOJWOAECPHRCV2UU3WCY37L3BNY6RZVKE23JGQYJMJ6&limit=10&order=asc" + href: "/accounts?liquidity_pool=dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7&cursor=GC4J73PTB5WN7MOJWOAECPHRCV2UU3WCY37L3BNY6RZVKE23JGQYJMJ6&limit=10&order=asc", }, prev: { - href: "/accounts?liquidity_pool=dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7&cursor=GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667&limit=10&order=desc" - } + href: "/accounts?liquidity_pool=dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7&cursor=GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667&limit=10&order=desc", + }, }, _embedded: { records: [ { _links: { self: { - href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667" + href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667", }, transactions: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/transactions{?cursor,limit,order}", - templated: true + templated: true, }, operations: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/operations{?cursor,limit,order}", - templated: true + templated: true, }, payments: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/payments{?cursor,limit,order}", - templated: true + templated: true, }, effects: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/effects{?cursor,limit,order}", - templated: true + templated: true, }, offers: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/offers{?cursor,limit,order}", - templated: true + templated: true, }, trades: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/trades{?cursor,limit,order}", - templated: true + templated: true, }, data: { href: "/accounts/GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667/data/{key}", - templated: true - } + templated: true, + }, }, id: "GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667", account_id: @@ -1596,13 +1596,13 @@ describe("server.js non-transaction tests", function () { thresholds: { low_threshold: 0, med_threshold: 0, - high_threshold: 0 + high_threshold: 0, }, flags: { auth_required: false, auth_revocable: false, auth_immutable: false, - auth_clawback_enabled: false + auth_clawback_enabled: false, }, balances: [ { @@ -1614,7 +1614,7 @@ describe("server.js non-transaction tests", function () { last_modified_ledger: 7877447, is_authorized: true, is_authorized_to_maintain_liabilities: false, - is_clawback_enabled: false + is_clawback_enabled: false, }, { balance: "0.0000000", @@ -1628,7 +1628,7 @@ describe("server.js non-transaction tests", function () { asset_type: "credit_alphanum4", asset_code: "ARST", asset_issuer: - "GB7TAYRUZGE6TVT7NHP5SMIZRNQA6PLM423EYISAOAP3MKYIQMVYP2JO" + "GB7TAYRUZGE6TVT7NHP5SMIZRNQA6PLM423EYISAOAP3MKYIQMVYP2JO", }, { balance: "0.0000000", @@ -1642,28 +1642,28 @@ describe("server.js non-transaction tests", function () { asset_type: "credit_alphanum4", asset_code: "USD", asset_issuer: - "GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ" + "GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ", }, { balance: "9999.9998600", buying_liabilities: "0.0000000", selling_liabilities: "0.0000000", - asset_type: "native" - } + asset_type: "native", + }, ], signers: [ { weight: 1, key: "GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667", - type: "ed25519_public_key" - } + type: "ed25519_public_key", + }, ], data: {}, paging_token: - "GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667" - } - ] - } + "GBPFGVESMB7HSTQREV354WA4UDGAPS2NCB5DZQ7K2VZM3PSX4TDCV667", + }, + ], + }, }; this.axiosMock @@ -1698,19 +1698,19 @@ describe("server.js non-transaction tests", function () { describe("OfferCallBuilder", function () { const offersResponse = { _embedded: { - records: [] + records: [], }, _links: { next: { - href: "/offers" + href: "/offers", }, prev: { - href: "/offers" + href: "/offers", }, self: { - href: "/offers" - } - } + href: "/offers", + }, + }, }; it("without params requests the correct endpoint", function (done) { @@ -1743,11 +1743,11 @@ describe("server.js non-transaction tests", function () { const offerResponse = { _links: { self: { - href: "https://horizon.stellar.org/offers/12345" + href: "https://horizon.stellar.org/offers/12345", }, offer_maker: { - href: "https://horizon.stellar.org/accounts/GCK4WSNF3F6ZNCMK6BU77ZCZ3NMF3JGU2U3ZAPKXYBKYYCJA72FDBY7K" - } + href: "https://horizon.stellar.org/accounts/GCK4WSNF3F6ZNCMK6BU77ZCZ3NMF3JGU2U3ZAPKXYBKYYCJA72FDBY7K", + }, }, id: 12345, paging_token: "12345", @@ -1756,19 +1756,19 @@ describe("server.js non-transaction tests", function () { asset_type: "credit_alphanum4", asset_code: "NGNT", asset_issuer: - "GAWODAROMJ33V5YDFY3NPYTHVYQG7MJXVJ2ND3AOGIHYRWINES6ACCPD" + "GAWODAROMJ33V5YDFY3NPYTHVYQG7MJXVJ2ND3AOGIHYRWINES6ACCPD", }, buying: { - asset_type: "native" + asset_type: "native", }, amount: "21611.9486669", price_r: { n: 52836797, - d: 1396841783 + d: 1396841783, }, price: "0.0378259", last_modified_ledger: 28285404, - last_modified_time: "2020-02-18T17:00:56Z" + last_modified_time: "2020-02-18T17:00:56Z", }; this.axiosMock @@ -1921,14 +1921,14 @@ describe("server.js non-transaction tests", function () { base: { asset_type: "native", asset_code: "", - asset_issuer: "" + asset_issuer: "", }, counter: { asset_type: "credit_alphanum4", asset_code: "USD", asset_issuer: - "GDVDKQFP665JAO7A2LSHNLQIUNYNAAIGJ6FYJVMG4DT3YJQQJSRBLQDG" - } + "GDVDKQFP665JAO7A2LSHNLQIUNYNAAIGJ6FYJVMG4DT3YJQQJSRBLQDG", + }, }; it("requests the correct endpoint native/credit", function (done) { @@ -1993,28 +1993,28 @@ describe("server.js non-transaction tests", function () { let tradesResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&cursor=" + href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&cursor=", }, next: { - href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&cursor=64199539053039617-0" + href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&cursor=64199539053039617-0", }, prev: { - href: "https://horizon-live.stellar.org:1337/trades?order=desc&limit=200&cursor=64199539053039617-0" - } + href: "https://horizon-live.stellar.org:1337/trades?order=desc&limit=200&cursor=64199539053039617-0", + }, }, _embedded: { records: [ { _links: { base: { - href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W" + href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W", }, counter: { - href: "https://horizon-live.stellar.org:1337/accounts/GC6APVH2HCFB7QLSTG3U55IYSW7ZRNSCTOZZYZJCNHWX2FONCNJNULYN" + href: "https://horizon-live.stellar.org:1337/accounts/GC6APVH2HCFB7QLSTG3U55IYSW7ZRNSCTOZZYZJCNHWX2FONCNJNULYN", }, operation: { - href: "https://horizon-live.stellar.org:1337/operations/64199539053039617" - } + href: "https://horizon-live.stellar.org:1337/operations/64199539053039617", + }, }, id: "64199539053039617-0", paging_token: "64199539053039617-0", @@ -2035,11 +2035,11 @@ describe("server.js non-transaction tests", function () { base_is_seller: true, price: { n: "1", - d: "2" - } - } - ] - } + d: "2", + }, + }, + ], + }, }; this.axiosMock @@ -2065,28 +2065,28 @@ describe("server.js non-transaction tests", function () { let tradesResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/trades?base_asset_type=native&counter_asset_type=credit_alphanum4&counter_asset_code=JPY&counter_asset_issuer=GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM&order=asc&limit=10&cursor=" + href: "https://horizon-live.stellar.org:1337/trades?base_asset_type=native&counter_asset_type=credit_alphanum4&counter_asset_code=JPY&counter_asset_issuer=GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM&order=asc&limit=10&cursor=", }, next: { - href: "https://horizon-live.stellar.org:1337/trades?base_asset_type=native&counter_asset_type=credit_alphanum4&counter_asset_code=JPY&counter_asset_issuer=GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM&order=asc&limit=10&cursor=64199539053039617-0" + href: "https://horizon-live.stellar.org:1337/trades?base_asset_type=native&counter_asset_type=credit_alphanum4&counter_asset_code=JPY&counter_asset_issuer=GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM&order=asc&limit=10&cursor=64199539053039617-0", }, prev: { - href: "https://horizon-live.stellar.org:1337/trades?base_asset_type=native&counter_asset_type=credit_alphanum4&counter_asset_code=JPY&counter_asset_issuer=GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM&order=desc&limit=10&cursor=64199539053039617-0" - } + href: "https://horizon-live.stellar.org:1337/trades?base_asset_type=native&counter_asset_type=credit_alphanum4&counter_asset_code=JPY&counter_asset_issuer=GBVAOIACNSB7OVUXJYC5UE2D4YK2F7A24T7EE5YOMN4CE6GCHUTOUQXM&order=desc&limit=10&cursor=64199539053039617-0", + }, }, _embedded: { records: [ { _links: { base: { - href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W" + href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W", }, counter: { - href: "https://horizon-live.stellar.org:1337/accounts/GC6APVH2HCFB7QLSTG3U55IYSW7ZRNSCTOZZYZJCNHWX2FONCNJNULYN" + href: "https://horizon-live.stellar.org:1337/accounts/GC6APVH2HCFB7QLSTG3U55IYSW7ZRNSCTOZZYZJCNHWX2FONCNJNULYN", }, operation: { - href: "https://horizon-live.stellar.org:1337/operations/64199539053039617" - } + href: "https://horizon-live.stellar.org:1337/operations/64199539053039617", + }, }, id: "64199539053039617-0", paging_token: "64199539053039617-0", @@ -2107,11 +2107,11 @@ describe("server.js non-transaction tests", function () { base_is_seller: true, price: { n: "1", - d: "2" - } - } - ] - } + d: "2", + }, + }, + ], + }, }; this.axiosMock @@ -2148,28 +2148,28 @@ describe("server.js non-transaction tests", function () { let tradesResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/trades?offer_id=278232&order=asc&limit=10&cursor=" + href: "https://horizon-live.stellar.org:1337/trades?offer_id=278232&order=asc&limit=10&cursor=", }, next: { - href: "https://horizon-live.stellar.org:1337/trades?offer_id=278232&order=asc&limit=10&cursor=64199539053039617-0" + href: "https://horizon-live.stellar.org:1337/trades?offer_id=278232&order=asc&limit=10&cursor=64199539053039617-0", }, prev: { - href: "https://horizon-live.stellar.org:1337/trades?offer_id=278232&order=desc&limit=10&cursor=64199539053039617-0" - } + href: "https://horizon-live.stellar.org:1337/trades?offer_id=278232&order=desc&limit=10&cursor=64199539053039617-0", + }, }, _embedded: { records: [ { _links: { base: { - href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W" + href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W", }, counter: { - href: "https://horizon-live.stellar.org:1337/accounts/GC6APVH2HCFB7QLSTG3U55IYSW7ZRNSCTOZZYZJCNHWX2FONCNJNULYN" + href: "https://horizon-live.stellar.org:1337/accounts/GC6APVH2HCFB7QLSTG3U55IYSW7ZRNSCTOZZYZJCNHWX2FONCNJNULYN", }, operation: { - href: "https://horizon-live.stellar.org:1337/operations/64199539053039617" - } + href: "https://horizon-live.stellar.org:1337/operations/64199539053039617", + }, }, id: "64199539053039617-0", paging_token: "64199539053039617-0", @@ -2190,11 +2190,11 @@ describe("server.js non-transaction tests", function () { base_is_seller: true, price: { n: "1", - d: "2" - } - } - ] - } + d: "2", + }, + }, + ], + }, }; this.axiosMock @@ -2225,31 +2225,31 @@ describe("server.js non-transaction tests", function () { let tradesResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/accounts/GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY/trades?cursor=&limit=10&order=asc" + href: "https://horizon-live.stellar.org:1337/accounts/GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY/trades?cursor=&limit=10&order=asc", }, next: { - href: "https://horizon-live.stellar.org:1337/accounts/GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY/trades?cursor=77434489365606401-1&limit=10&order=asc" + href: "https://horizon-live.stellar.org:1337/accounts/GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY/trades?cursor=77434489365606401-1&limit=10&order=asc", }, prev: { - href: "https://horizon-live.stellar.org:1337/accounts/GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY/trades?cursor=77434489365606401-1&limit=10&order=desc" - } + href: "https://horizon-live.stellar.org:1337/accounts/GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY/trades?cursor=77434489365606401-1&limit=10&order=desc", + }, }, _embedded: { records: [ { _links: { self: { - href: "" + href: "", }, seller: { - href: "https://horizon-live.stellar.org:1337/accounts/GBDTBUKFHJOEAFAVNPGIY65CBIH75DYEZ5VQXOE7YHZM7AJKDNEOW5JG" + href: "https://horizon-live.stellar.org:1337/accounts/GBDTBUKFHJOEAFAVNPGIY65CBIH75DYEZ5VQXOE7YHZM7AJKDNEOW5JG", }, buyer: { - href: "https://horizon-live.stellar.org:1337/accounts/GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY" + href: "https://horizon-live.stellar.org:1337/accounts/GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY", }, operation: { - href: "https://horizon-live.stellar.org:1337/operations/77434489365606401" - } + href: "https://horizon-live.stellar.org:1337/operations/77434489365606401", + }, }, id: "77434489365606401-1", paging_token: "77434489365606401-1", @@ -2263,10 +2263,10 @@ describe("server.js non-transaction tests", function () { "GABJBA4HI4LVKWAYORE7SOAAZMVXDHI566JBSD25O5TRDM7LVID6YOXY", bought_amount: "", bought_asset_type: "", - created_at: "2018-05-23T22:42:28Z" - } - ] - } + created_at: "2018-05-23T22:42:28Z", + }, + ], + }, }; this.axiosMock @@ -2299,28 +2299,28 @@ describe("server.js non-transaction tests", function () { let tradesResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=1&cursor=64199539053039617-0" + href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=1&cursor=64199539053039617-0", }, next: { - href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=1&cursor=64199676491993090-0" + href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=1&cursor=64199676491993090-0", }, prev: { - href: "https://horizon-live.stellar.org:1337/trades?order=desc&limit=1&cursor=64199676491993090-0" - } + href: "https://horizon-live.stellar.org:1337/trades?order=desc&limit=1&cursor=64199676491993090-0", + }, }, _embedded: { records: [ { _links: { base: { - href: "https://horizon-live.stellar.org:1337/accounts/GBBHSWC3XSUFKEFDPQO346BCLM3EAJHICWRVSVIQOG4YBIH3A2VCJ6G2" + href: "https://horizon-live.stellar.org:1337/accounts/GBBHSWC3XSUFKEFDPQO346BCLM3EAJHICWRVSVIQOG4YBIH3A2VCJ6G2", }, counter: { - href: "https://horizon-live.stellar.org:1337/accounts/GDBXANSAUQ5WBFSA6LFQXR5PYVYAQ3T4KI4LHZ3YAAEFI3BS2Z3SFRVG" + href: "https://horizon-live.stellar.org:1337/accounts/GDBXANSAUQ5WBFSA6LFQXR5PYVYAQ3T4KI4LHZ3YAAEFI3BS2Z3SFRVG", }, operation: { - href: "https://horizon-live.stellar.org:1337/operations/64199676491993090" - } + href: "https://horizon-live.stellar.org:1337/operations/64199676491993090", + }, }, id: "64199676491993090-0", paging_token: "64199676491993090-0", @@ -2344,11 +2344,11 @@ describe("server.js non-transaction tests", function () { base_is_seller: false, price: { n: "1", - d: "2" - } - } - ] - } + d: "2", + }, + }, + ], + }, }; this.axiosMock @@ -2381,28 +2381,28 @@ describe("server.js non-transaction tests", function () { let tradesResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&trade_type=orderbook&cursor=" + href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&trade_type=orderbook&cursor=", }, next: { - href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&trade_type=orderbook&cursor=64199539053039617-0" + href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&trade_type=orderbook&cursor=64199539053039617-0", }, prev: { - href: "https://horizon-live.stellar.org:1337/trades?order=desc&limit=200&trade_type=orderbook&cursor=64199539053039617-0" - } + href: "https://horizon-live.stellar.org:1337/trades?order=desc&limit=200&trade_type=orderbook&cursor=64199539053039617-0", + }, }, _embedded: { records: [ { _links: { base: { - href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W" + href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W", }, counter: { - href: "https://horizon-live.stellar.org:1337/accounts/GC6APVH2HCFB7QLSTG3U55IYSW7ZRNSCTOZZYZJCNHWX2FONCNJNULYN" + href: "https://horizon-live.stellar.org:1337/accounts/GC6APVH2HCFB7QLSTG3U55IYSW7ZRNSCTOZZYZJCNHWX2FONCNJNULYN", }, operation: { - href: "https://horizon-live.stellar.org:1337/operations/64199539053039617" - } + href: "https://horizon-live.stellar.org:1337/operations/64199539053039617", + }, }, id: "64199539053039617-0", paging_token: "64199539053039617-0", @@ -2423,11 +2423,11 @@ describe("server.js non-transaction tests", function () { base_is_seller: true, price: { n: "1", - d: "2" - } - } - ] - } + d: "2", + }, + }, + ], + }, }; this.axiosMock @@ -2458,28 +2458,28 @@ describe("server.js non-transaction tests", function () { let tradesResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&trade_type=liquidity_pool&cursor=" + href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&trade_type=liquidity_pool&cursor=", }, next: { - href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&trade_type=liquidity_pool&cursor=64199539053039617-0" + href: "https://horizon-live.stellar.org:1337/trades?order=asc&limit=200&trade_type=liquidity_pool&cursor=64199539053039617-0", }, prev: { - href: "https://horizon-live.stellar.org:1337/trades?order=desc&limit=200&trade_type=liquidity_pool&cursor=64199539053039617-0" - } + href: "https://horizon-live.stellar.org:1337/trades?order=desc&limit=200&trade_type=liquidity_pool&cursor=64199539053039617-0", + }, }, _embedded: { records: [ { _links: { base: { - href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W" + href: "https://horizon-live.stellar.org:1337/accounts/GB7JKG66CJN3ACX5DX43FOZTTSOI7GZUP547I3BSXIJVUX3NRYUXHE6W", }, counter: { - href: "https://horizon-live.stellar.org:1337/liquidity_pool/dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7" + href: "https://horizon-live.stellar.org:1337/liquidity_pool/dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7", }, operation: { - href: "https://horizon-live.stellar.org:1337/operations/64199539053039617" - } + href: "https://horizon-live.stellar.org:1337/operations/64199539053039617", + }, }, id: "64199539053039617-0", paging_token: "64199539053039617-0", @@ -2501,11 +2501,11 @@ describe("server.js non-transaction tests", function () { base_is_seller: true, price: { n: "1", - d: "2" - } - } - ] - } + d: "2", + }, + }, + ], + }, }; this.axiosMock @@ -2548,7 +2548,7 @@ describe("server.js non-transaction tests", function () { source_asset_code: "USD", source_asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - source_asset_type: "credit_alphanum4" + source_asset_type: "credit_alphanum4", }, { destination_amount: "20.0000000", @@ -2561,14 +2561,14 @@ describe("server.js non-transaction tests", function () { asset_code: "1", asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - asset_type: "credit_alphanum4" - } + asset_type: "credit_alphanum4", + }, ], source_amount: "20.0000000", source_asset_code: "USD", source_asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - source_asset_type: "credit_alphanum4" + source_asset_type: "credit_alphanum4", }, { destination_amount: "20.0000000", @@ -2581,28 +2581,28 @@ describe("server.js non-transaction tests", function () { asset_code: "21", asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - asset_type: "credit_alphanum4" + asset_type: "credit_alphanum4", }, { asset_code: "22", asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - asset_type: "credit_alphanum4" - } + asset_type: "credit_alphanum4", + }, ], source_amount: "20.0000000", source_asset_code: "USD", source_asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - source_asset_type: "credit_alphanum4" - } - ] + source_asset_type: "credit_alphanum4", + }, + ], }, _links: { self: { - href: "/paths/strict-receive" - } - } + href: "/paths/strict-receive", + }, + }, }; it("requests the correct endpoint when source is an account", function (done) { @@ -2659,7 +2659,7 @@ describe("server.js non-transaction tests", function () { new StellarSdk.Asset( "USD", "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN" - ) + ), ]; this.server @@ -2701,7 +2701,7 @@ describe("server.js non-transaction tests", function () { source_asset_code: "USD", source_asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - source_asset_type: "credit_alphanum4" + source_asset_type: "credit_alphanum4", }, { destination_amount: "20.0000000", @@ -2714,14 +2714,14 @@ describe("server.js non-transaction tests", function () { asset_code: "1", asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - asset_type: "credit_alphanum4" - } + asset_type: "credit_alphanum4", + }, ], source_amount: "20.0000000", source_asset_code: "USD", source_asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - source_asset_type: "credit_alphanum4" + source_asset_type: "credit_alphanum4", }, { destination_amount: "20.0000000", @@ -2734,28 +2734,28 @@ describe("server.js non-transaction tests", function () { asset_code: "21", asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - asset_type: "credit_alphanum4" + asset_type: "credit_alphanum4", }, { asset_code: "22", asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - asset_type: "credit_alphanum4" - } + asset_type: "credit_alphanum4", + }, ], source_amount: "20.0000000", source_asset_code: "USD", source_asset_issuer: "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN", - source_asset_type: "credit_alphanum4" - } - ] + source_asset_type: "credit_alphanum4", + }, + ], }, _links: { self: { - href: "/paths/strict-send" - } - } + href: "/paths/strict-send", + }, + }, }; it("requests the correct endpoint when destination is account", function (done) { @@ -2812,7 +2812,7 @@ describe("server.js non-transaction tests", function () { new StellarSdk.Asset( "USD", "GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN" - ) + ), ]; this.server @@ -2846,35 +2846,35 @@ describe("server.js non-transaction tests", function () { { _links: { operation: { - href: "/operations/146028892161" + href: "/operations/146028892161", }, precedes: { - href: "/effects?cursor=146028892161-1\u0026order=asc" + href: "/effects?cursor=146028892161-1\u0026order=asc", }, succeeds: { - href: "/effects?cursor=146028892161-1\u0026order=desc" - } + href: "/effects?cursor=146028892161-1\u0026order=desc", + }, }, account: "GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K", paging_token: "146028892161-1", starting_balance: "10000000.0", type: 0, - type_s: "account_created" - } - ] + type_s: "account_created", + }, + ], }, _links: { next: { - href: "/effects?order=asc\u0026limit=1\u0026cursor=146028892161-1" + href: "/effects?order=asc\u0026limit=1\u0026cursor=146028892161-1", }, prev: { - href: "/effects?order=desc\u0026limit=1\u0026cursor=146028892161-1" + href: "/effects?order=desc\u0026limit=1\u0026cursor=146028892161-1", }, self: { - href: "/effects?order=asc\u0026limit=1\u0026cursor=" - } - } + href: "/effects?order=asc\u0026limit=1\u0026cursor=", + }, + }, }; it("requests the correct endpoint", function (done) { @@ -2978,20 +2978,20 @@ describe("server.js non-transaction tests", function () { _links: { effects: { href: "/operations/146028892161/effects{?cursor,limit,order}", - templated: true + templated: true, }, precedes: { - href: "/operations?cursor=146028892161\u0026order=asc" + href: "/operations?cursor=146028892161\u0026order=asc", }, self: { - href: "/operations/146028892161" + href: "/operations/146028892161", }, succeeds: { - href: "/operations?cursor=146028892161\u0026order=desc" + href: "/operations?cursor=146028892161\u0026order=desc", }, transaction: { - href: "/transactions/991534d902063b7715cd74207bef4e7bd7aa2f108f62d3eba837ce6023b2d4f3" - } + href: "/transactions/991534d902063b7715cd74207bef4e7bd7aa2f108f62d3eba837ce6023b2d4f3", + }, }, account: "GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K", @@ -3001,21 +3001,21 @@ describe("server.js non-transaction tests", function () { paging_token: "146028892161", starting_balance: "10000000.0", type: 0, - type_s: "create_account" - } - ] + type_s: "create_account", + }, + ], }, _links: { next: { - href: "/operations?order=asc\u0026limit=1\u0026cursor=146028892161" + href: "/operations?order=asc\u0026limit=1\u0026cursor=146028892161", }, prev: { - href: "/operations?order=desc\u0026limit=1\u0026cursor=146028892161" + href: "/operations?order=desc\u0026limit=1\u0026cursor=146028892161", }, self: { - href: "/operations?order=asc\u0026limit=1\u0026cursor=" - } - } + href: "/operations?order=asc\u0026limit=1\u0026cursor=", + }, + }, }; it("operation() requests the correct endpoint", function (done) { @@ -3166,20 +3166,20 @@ describe("server.js non-transaction tests", function () { _links: { effects: { href: "/operations/146028892161/effects{?cursor,limit,order}", - templated: true + templated: true, }, precedes: { - href: "/operations?cursor=146028892161\u0026order=asc" + href: "/operations?cursor=146028892161\u0026order=asc", }, self: { - href: "/operations/146028892161" + href: "/operations/146028892161", }, succeeds: { - href: "/operations?cursor=146028892161\u0026order=desc" + href: "/operations?cursor=146028892161\u0026order=desc", }, transaction: { - href: "/transactions/991534d902063b7715cd74207bef4e7bd7aa2f108f62d3eba837ce6023b2d4f3" - } + href: "/transactions/991534d902063b7715cd74207bef4e7bd7aa2f108f62d3eba837ce6023b2d4f3", + }, }, account: "GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K", @@ -3189,21 +3189,21 @@ describe("server.js non-transaction tests", function () { paging_token: "146028892161", starting_balance: "10000000.0", type: 0, - type_s: "create_account" - } - ] + type_s: "create_account", + }, + ], }, _links: { next: { - href: "/payments?order=asc\u0026limit=1\u0026cursor=146028892161" + href: "/payments?order=asc\u0026limit=1\u0026cursor=146028892161", }, prev: { - href: "/payments?order=desc\u0026limit=1\u0026cursor=146028892161" + href: "/payments?order=desc\u0026limit=1\u0026cursor=146028892161", }, self: { - href: "/payments?order=asc\u0026limit=1\u0026cursor=" - } - } + href: "/payments?order=asc\u0026limit=1\u0026cursor=", + }, + }, }; it("forAccount() requests the correct endpoint", function (done) { @@ -3294,7 +3294,7 @@ describe("server.js non-transaction tests", function () { describe("FriendbotCallBuilder", function () { let friendbotResponse = { - ledger: 2 + ledger: 2, }; it("requests the correct endpoint", function (done) { @@ -3324,14 +3324,14 @@ describe("server.js non-transaction tests", function () { let tradeAggregationResponse = { _links: { self: { - href: "https://horizon.stellar.org/trade_aggregations?base_asset_type=native\u0026counter_asset_type=credit_alphanum4\u0026counter_asset_code=BTC\u0026counter_asset_issuer=GATEMHCCKCY67ZUCKTROYN24ZYT5GK4EQZ65JJLDHKHRUZI3EUEKMTCH\u0026start_time=1512689100000\u0026end_time=1512775500000\u0026resolution=300000" + href: "https://horizon.stellar.org/trade_aggregations?base_asset_type=native\u0026counter_asset_type=credit_alphanum4\u0026counter_asset_code=BTC\u0026counter_asset_issuer=GATEMHCCKCY67ZUCKTROYN24ZYT5GK4EQZ65JJLDHKHRUZI3EUEKMTCH\u0026start_time=1512689100000\u0026end_time=1512775500000\u0026resolution=300000", }, next: { - href: "https://horizon.stellar.org/trade_aggregations?base_asset_type=native\u0026counter_asset_code=BTC\u0026counter_asset_issuer=GATEMHCCKCY67ZUCKTROYN24ZYT5GK4EQZ65JJLDHKHRUZI3EUEKMTCH\u0026counter_asset_type=credit_alphanum4\u0026end_time=1512775500000\u0026resolution=300000\u0026start_time=1512765000000" + href: "https://horizon.stellar.org/trade_aggregations?base_asset_type=native\u0026counter_asset_code=BTC\u0026counter_asset_issuer=GATEMHCCKCY67ZUCKTROYN24ZYT5GK4EQZ65JJLDHKHRUZI3EUEKMTCH\u0026counter_asset_type=credit_alphanum4\u0026end_time=1512775500000\u0026resolution=300000\u0026start_time=1512765000000", }, prev: { - href: "" - } + href: "", + }, }, _embedded: { records: [ @@ -3344,7 +3344,7 @@ describe("server.js non-transaction tests", function () { high: "0.0000122", low: "0.0000122", open: "0.0000122", - close: "0.0000122" + close: "0.0000122", }, { timestamp: 1512732300000, @@ -3355,7 +3355,7 @@ describe("server.js non-transaction tests", function () { high: "0.0000122", low: "0.0000122", open: "0.0000122", - close: "0.0000122" + close: "0.0000122", }, { timestamp: 1512764700000, @@ -3366,10 +3366,10 @@ describe("server.js non-transaction tests", function () { high: "0.0000062", low: "0.0000062", open: "0.0000062", - close: "0.0000062" - } - ] - } + close: "0.0000062", + }, + ], + }, }; it("requests the correct endpoint native/credit", function (done) { @@ -3450,22 +3450,22 @@ describe("server.js non-transaction tests", function () { let assetsResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/assets?order=asc\u0026limit=1\u0026cursor=" + href: "https://horizon-live.stellar.org:1337/assets?order=asc\u0026limit=1\u0026cursor=", }, next: { - href: "https://horizon-live.stellar.org:1337/assets?order=asc\u0026limit=1\u0026cursor=9HORIZONS_GB2HXY7UEDCSHOWZ4553QFGFILNU73OFS2P4HU5IB3UUU66TWPBPVTGW_credit_alphanum12" + href: "https://horizon-live.stellar.org:1337/assets?order=asc\u0026limit=1\u0026cursor=9HORIZONS_GB2HXY7UEDCSHOWZ4553QFGFILNU73OFS2P4HU5IB3UUU66TWPBPVTGW_credit_alphanum12", }, prev: { - href: "https://horizon-live.stellar.org:1337/assets?order=desc\u0026limit=1\u0026cursor=9HORIZONS_GB2HXY7UEDCSHOWZ4553QFGFILNU73OFS2P4HU5IB3UUU66TWPBPVTGW_credit_alphanum12" - } + href: "https://horizon-live.stellar.org:1337/assets?order=desc\u0026limit=1\u0026cursor=9HORIZONS_GB2HXY7UEDCSHOWZ4553QFGFILNU73OFS2P4HU5IB3UUU66TWPBPVTGW_credit_alphanum12", + }, }, _embedded: { records: [ { _links: { toml: { - href: "" - } + href: "", + }, }, asset_type: "credit_alphanum12", asset_code: "9HORIZONS", @@ -3476,13 +3476,13 @@ describe("server.js non-transaction tests", function () { accounts: { authorized: 2, authorized_to_maintain_liabilities: 1, - unauthorized: 0 + unauthorized: 0, }, num_claimable_balances: 3, balances: { authorized: "1000000.0000000", authorized_to_maintain_liabilities: "500000.0000000", - unauthorized: "0.0000000" + unauthorized: "0.0000000", }, claimable_balances_amount: "0.0000000", amount: "1000000.0000000", @@ -3491,11 +3491,11 @@ describe("server.js non-transaction tests", function () { auth_required: false, auth_revocable: false, auth_immutable: false, - auth_clawback_enabled: false - } - } - ] - } + auth_clawback_enabled: false, + }, + }, + ], + }, }; this.axiosMock @@ -3524,22 +3524,22 @@ describe("server.js non-transaction tests", function () { let assetsCodeResponse = { _links: { self: { - href: "https://horizon-live.stellar.org:1337/assets?order=asc\u0026limit=1\u0026cursor=\u0026asset_code=USD" + href: "https://horizon-live.stellar.org:1337/assets?order=asc\u0026limit=1\u0026cursor=\u0026asset_code=USD", }, next: { - href: "https://horizon-live.stellar.org:1337/assets?order=asc\u0026limit=1\u0026cursor=USD_GCYK67DDGBOANS6UODJ62QWGLEB2A7JQ3XUV25HCMLT7CI23PMMK3W6R_credit_alphanum4\u0026asset_code=USD" + href: "https://horizon-live.stellar.org:1337/assets?order=asc\u0026limit=1\u0026cursor=USD_GCYK67DDGBOANS6UODJ62QWGLEB2A7JQ3XUV25HCMLT7CI23PMMK3W6R_credit_alphanum4\u0026asset_code=USD", }, prev: { - href: "https://horizon-live.stellar.org:1337/assets?order=desc\u0026limit=1\u0026cursor=USD_GCYK67DDGBOANS6UODJ62QWGLEB2A7JQ3XUV25HCMLT7CI23PMMK3W6R_credit_alphanum4\u0026asset_code=USD" - } + href: "https://horizon-live.stellar.org:1337/assets?order=desc\u0026limit=1\u0026cursor=USD_GCYK67DDGBOANS6UODJ62QWGLEB2A7JQ3XUV25HCMLT7CI23PMMK3W6R_credit_alphanum4\u0026asset_code=USD", + }, }, _embedded: { records: [ { _links: { toml: { - href: "" - } + href: "", + }, }, asset_type: "credit_alphanum4", asset_code: "USD", @@ -3550,13 +3550,13 @@ describe("server.js non-transaction tests", function () { accounts: { authorized: 127, authorized_to_maintain_liabilities: 64, - unauthorized: 0 + unauthorized: 0, }, num_claimable_balances: 3, balances: { authorized: "111.0010000", authorized_to_maintain_liabilities: "55.5005000", - unauthorized: "0.0000000" + unauthorized: "0.0000000", }, claimable_balances_amount: "0.0000000", amount: "111.0010000", @@ -3565,11 +3565,11 @@ describe("server.js non-transaction tests", function () { auth_required: false, auth_revocable: false, auth_immutable: false, - auth_clawback_enabled: false - } - } - ] - } + auth_clawback_enabled: false, + }, + }, + ], + }, }; this.axiosMock .expects("get") @@ -3600,22 +3600,22 @@ describe("server.js non-transaction tests", function () { let assetIssuerResponse = { _links: { self: { - href: "http://horizon-testnet.stellar.org:1337/assets?order=asc\u0026limit=10\u0026cursor=\u0026asset_issuer=GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN" + href: "http://horizon-testnet.stellar.org:1337/assets?order=asc\u0026limit=10\u0026cursor=\u0026asset_issuer=GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN", }, next: { - href: "http://horizon-testnet.stellar.org:1337/assets?order=asc\u0026limit=10\u0026cursor=00acc1_GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN_credit_alphanum12\u0026asset_issuer=GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN" + href: "http://horizon-testnet.stellar.org:1337/assets?order=asc\u0026limit=10\u0026cursor=00acc1_GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN_credit_alphanum12\u0026asset_issuer=GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN", }, prev: { - href: "http://horizon-testnet.stellar.org:1337/assets?order=desc\u0026limit=10\u0026cursor=004d40_GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN_credit_alphanum12\u0026asset_issuer=GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN" - } + href: "http://horizon-testnet.stellar.org:1337/assets?order=desc\u0026limit=10\u0026cursor=004d40_GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN_credit_alphanum12\u0026asset_issuer=GCOGPF7IRVXUCJZAQWXVFQEE4HAOCTDGZI2QZSMKLM5BTTGRLY6GDOJN", + }, }, _embedded: { records: [ { _links: { toml: { - href: "" - } + href: "", + }, }, asset_type: "credit_alphanum12", asset_code: "004d40", @@ -3626,13 +3626,13 @@ describe("server.js non-transaction tests", function () { accounts: { authorized: 18, authorized_to_maintain_liabilities: 9, - unauthorized: 0 + unauthorized: 0, }, num_claimable_balances: 3, balances: { authorized: "757.0000000", authorized_to_maintain_liabilities: "378.5000000", - unauthorized: "0.0000000" + unauthorized: "0.0000000", }, claimable_balances_amount: "0.0000000", amount: "757.0000000", @@ -3641,11 +3641,11 @@ describe("server.js non-transaction tests", function () { auth_required: false, auth_revocable: false, auth_immutable: false, - auth_clawback_enabled: false - } - } - ] - } + auth_clawback_enabled: false, + }, + }, + ], + }, }; this.axiosMock .expects("get") @@ -3675,22 +3675,22 @@ describe("server.js non-transaction tests", function () { let assetCodeIssuerResponse = { _links: { self: { - href: "http://horizon-testnet.stellar.org/assets?order=asc\u0026limit=10\u0026cursor=\u0026asset_code=USD\u0026asset_issuer=GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR" + href: "http://horizon-testnet.stellar.org/assets?order=asc\u0026limit=10\u0026cursor=\u0026asset_code=USD\u0026asset_issuer=GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR", }, next: { - href: "http://horizon-testnet.stellar.org/assets?order=asc\u0026limit=10\u0026cursor=USD_GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR_credit_alphanum4\u0026asset_code=USD\u0026asset_issuer=GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR" + href: "http://horizon-testnet.stellar.org/assets?order=asc\u0026limit=10\u0026cursor=USD_GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR_credit_alphanum4\u0026asset_code=USD\u0026asset_issuer=GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR", }, prev: { - href: "http://horizon-testnet.stellar.org/assets?order=desc\u0026limit=10\u0026cursor=USD_GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR_credit_alphanum4\u0026asset_code=USD\u0026asset_issuer=GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR" - } + href: "http://horizon-testnet.stellar.org/assets?order=desc\u0026limit=10\u0026cursor=USD_GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR_credit_alphanum4\u0026asset_code=USD\u0026asset_issuer=GBW3EZBZKRERB4JUDWGQPIBGHKJ4XPOFG2VQ2WTFR4F7TYC5WS7F3XGR", + }, }, _embedded: { records: [ { _links: { toml: { - href: "https://bakalr/.well-known/stellar.toml" - } + href: "https://bakalr/.well-known/stellar.toml", + }, }, asset_type: "credit_alphanum4", asset_code: "USD", @@ -3701,13 +3701,13 @@ describe("server.js non-transaction tests", function () { accounts: { authorized: 1, authorized_to_maintain_liabilities: 0, - unauthorized: 0 + unauthorized: 0, }, num_claimable_balances: 0, balances: { authorized: "1387.0000000", authorized_to_maintain_liabilities: "0.0000000", - unauthorized: "0.0000000" + unauthorized: "0.0000000", }, claimable_balances_amount: "0.0000000", amount: "1387.0000000", @@ -3716,11 +3716,11 @@ describe("server.js non-transaction tests", function () { auth_required: true, auth_revocable: true, auth_immutable: false, - auth_clawback_enabled: false - } - } - ] - } + auth_clawback_enabled: false, + }, + }, + ], + }, }; it("requests the correct endpoint (asset_code then asset_issuer)", function (done) { this.axiosMock diff --git a/test/unit/server_transaction_test.js b/test/unit/server_transaction_test.js index d166c40c9..537355809 100644 --- a/test/unit/server_transaction_test.js +++ b/test/unit/server_transaction_test.js @@ -10,14 +10,14 @@ describe("server.js transaction tests", function () { let transaction = new StellarSdk.TransactionBuilder(account, { fee: 100, networkPassphrase: StellarSdk.Networks.TESTNET, - v1: true + v1: true, }) .addOperation( StellarSdk.Operation.payment({ destination: "GASOCNHNNLYFNMDJYQ3XFMI7BYHIOCFW3GJEOWRPEGK2TDPGTG2E5EDW", asset: StellarSdk.Asset.native(), - amount: "100.50" + amount: "100.50", }) ) .setTimeout(StellarSdk.TimeoutInfinite) @@ -57,8 +57,8 @@ describe("server.js transaction tests", function () { const response = { _links: { transaction: { - href: "https://horizon.stellar.org/transactions/db2c69a07be57eb5baefbfbb72b95c7c20d2c4d6f2a0e84e7c27dd0359055a2f" - } + href: "https://horizon.stellar.org/transactions/db2c69a07be57eb5baefbfbb72b95c7c20d2c4d6f2a0e84e7c27dd0359055a2f", + }, }, hash: "db2c69a07be57eb5baefbfbb72b95c7c20d2c4d6f2a0e84e7c27dd0359055a2f", ledger: 22895637, @@ -66,7 +66,7 @@ describe("server.js transaction tests", function () { "AAAAAIUAEW3jQt3+fbT6nCASA1/8RWdp9fJ2woxqPHZPQUH/AAAAZAEH/OgAAAAjAAAAAQAAAAAAAAAAAAAAAFyIDdQAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZO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AAAAAAQAAAAA=", }; this.axiosMock @@ -102,8 +102,8 @@ describe("server.js transaction tests", function () { const response = { _links: { transaction: { - href: "https://horizon.stellar.org/transactions/d88ded94c558790f7e819b85fd35adb10a1e474312c34ebd611495c349a8eb69" - } + href: "https://horizon.stellar.org/transactions/d88ded94c558790f7e819b85fd35adb10a1e474312c34ebd611495c349a8eb69", + }, }, hash: "d88ded94c558790f7e819b85fd35adb10a1e474312c34ebd611495c349a8eb69", ledger: 22895558, @@ -112,7 +112,7 @@ describe("server.js transaction tests", function () { result_xdr: "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAdZtwPxUrSKeMmz4rsGwKlBWXVRNIbTx3gJgwrvXYkfwAAAAABGaF7AAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZOoo06ckzbhyDIFKfhAAAAAACj1/kAAAAAAAAAAAExLP8AAAACAAAAAA==", result_meta_xdr: - "AAAAAQAAAAIAAAADAV1bxgAAAAAAAAAAhQARbeNC3f59tPqcIBIDX/xFZ2n18nbCjGo8dk9BQf8AAAACVLWWfQEH/OgAAAAfAAAABQAAAAEAAAAAhD8BLsZFQEF33rKS6YopQUT3b6iLBG4nspe68/DBNBYAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBXVvGAAAAAAAAAACFABFt40Ld/n20+pwgEgNf/EVnafXydsKMajx2T0FB/wAAAAJUtZZ9AQf86AAAACAAAAAFAAAAAQAAAACEPwEuxkVAQXfespLpiilBRPdvqIsEbieyl7rz8ME0FgAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAoAAAADAV1bvAAAAAIAAAAAdZtwPxUrSKeMmz4rsGwKlBWXVRNIbTx3gJgwrvXYkfwAAAAABGaF7AAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZOoo06ckzbhyDIFKf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AAAALaNFPKAAAADouVkLYAAAAAAAAAAAAAAAMBXVmCAAAAAQAAAACFABFt40Ld/n20+pwgEgNf/EVnafXydsKMajx2T0FB/wAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZOoo06ckzbhyDIFKfhAAAAAAAAAAB//////////wAAAAEAAAAAAAAAAAAAAAEBXVvGAAAAAQAAAACFABFt40Ld/n20+pwgEgNf/EVnafXydsKMajx2T0FB/wAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZOoo06ckzbhyDIFKfhAAAAAACj1/l//////////wAAAAEAAAAAAAAAAAAAAAMBXVvGAAAAAAAAAACFABFt40Ld/n20+pwgEgNf/EVnafXydsKMajx2T0FB/wAAAAJUtZZ9AQf86AAAACAAAAAFAAAAAQAAAACEPwEuxkVAQXfespLpiilBRPdvqIsEbieyl7rz8ME0FgAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQFdW8YAAAAAAAAAAIUAEW3jQt3+fbT6nCASA1/8RWdp9fJ2woxqPHZPQUH/AAAAAlOEaX4BB/zoAAAAIAAAAAUAAAABAAAAAIQ/AS7GRUBBd96ykumKKUFE92+oiwRuJ7KXuvPwwTQWAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", }; this.axiosMock @@ -146,8 +146,8 @@ describe("server.js transaction tests", function () { const response = { _links: { transaction: { - href: "https://horizon.stellar.org/transactions/e1c2b91141d8c4185dc8c18118f345a269d88c476bdadec695c1b3ecdc999831" - } + href: "https://horizon.stellar.org/transactions/e1c2b91141d8c4185dc8c18118f345a269d88c476bdadec695c1b3ecdc999831", + }, }, hash: "e1c2b91141d8c4185dc8c18118f345a269d88c476bdadec695c1b3ecdc999831", ledger: 22896129, @@ -156,7 +156,7 @@ describe("server.js transaction tests", function () { result_xdr: "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAADAAAAAA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AAAAAAAAAEBXV4BAAAAAQAAAACFABFt40Ld/n20+pwgEgNf/EVnafXydsKMajx2T0FB/wAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZOoo06ckzbhyDIFKfhAAAAAACj1/l//////////wAAAAEAAAABAAAAAACYloAAAAAAAAAAAAAAAAAAAAAAAAAAAwFdXgEAAAAAAAAAAIUAEW3jQt3+fbT6nCASA1/8RWdp9fJ2woxqPHZPQUH/AAAAAlOEZ+4BB/zoAAAAJAAAAAUAAAABAAAAAIQ/AS7GRUBBd96ykumKKUFE92+oiwRuJ7KXuvPwwTQWAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAV1eAQAAAAAAAAAAhQARbeNC3f59tPqcIBIDX/xFZ2n18nbCjGo8dk9BQf8AAAACU4Rn7gEH/OgAAAAkAAAABgAAAAEAAAAAhD8BLsZFQEF33rKS6YopQUT3b6iLBG4nspe68/DBNBYAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAACYloAAAAAAAAAAAAAAAAABXV4BAAAAAgAAAACFABFt40Ld/n20+pwgEgNf/EVnafXydsKMajx2T0FB/wAAAAAEZqfGAAAAAAAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZOoo06ckzbhyDIFKfhAAAAAACYloAAAAABAAAAAQAAAAAAAAAAAAAAAA==", }; this.axiosMock @@ -190,8 +190,8 @@ describe("server.js transaction tests", function () { const response = { _links: { transaction: { - href: "https://horizon.stellar.org/transactions/28552ba6a70ab74f6de05319950e2ddad94491159ebc97b14cfcde2d3c7e70a1" - } + href: "https://horizon.stellar.org/transactions/28552ba6a70ab74f6de05319950e2ddad94491159ebc97b14cfcde2d3c7e70a1", + }, }, hash: "28552ba6a70ab74f6de05319950e2ddad94491159ebc97b14cfcde2d3c7e70a1", ledger: 22896525, @@ -200,7 +200,7 @@ describe("server.js transaction tests", function () { result_xdr: "AAAAAAAA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AAAAAAAAAAzFOugAAAAAAAAAAAAAAADAV1fggAAAAIAAAAAdZtwPxUrSKeMmz4rsGwKlBWXVRNIbTx3gJgwrvXYkfwAAAAABGbAwwAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZOoo06ckzbhyDIFKfhAAAAAAAAAAAgFcrXAIv23wBMS0AAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAB1m3A/FStIp4ybPiuwbAqUFZdVE0htPHeAmDCu9diR/AAAAAAEZsDDAAAAAwFdX4IAAAABAAAAAHWbcD8VK0injJs+K7BsCpQVl1UTSG08d4CYMK712JH8AAAAAUJBVAAAAAAARkrT28ebM6YQyhVZi1ttlwq/dk6ijTpyTNuHIMgUp+EAAAABgQWCFn//////////AAAAAQAAAAEAAAAIIq08AgAAAAGBBYIVAAAAAAAAAAAAAAABAV1fjQAAAAEAAAAAdZtwPxUrSKeMmz4rsGwKlBWXVRNIbTx3gJgwrvXYkfwAAAABQkFUAAAAAABGStPbx5szphDKFVmLW22XCr92TqKNOnJM24cgyBSn4QAAAAFg77c/f/////////8AAAABAAAAAQAAAAgirTwCAAAAAWDvtz4AAAAAAAAAAAAAAAABXV+NAAAAAgAAAACFABFt40Ld/n20+pwgEgNf/EVnafXydsKMajx2T0FB/wAAAAAEZsEvAAAAAAAAAAFCQVQAAAAAAEZK09vHmzOmEMoVWYtbbZcKv3ZOoo06ckzbhyDIFKfhAAAAADJ8VSAATEtAAIv23wAAAAAAAAAAAAAAAA==", }; this.axiosMock @@ -245,8 +245,8 @@ describe("server.js transaction tests", function () { const response = { _links: { transaction: { - href: "https://horizon.stellar.org/transactions/6c3191f252f2c586c74275c766ce761021513e520eab3bb63d3fd18d0d01492e" - } + href: "https://horizon.stellar.org/transactions/6c3191f252f2c586c74275c766ce761021513e520eab3bb63d3fd18d0d01492e", + }, }, hash: "6c3191f252f2c586c74275c766ce761021513e520eab3bb63d3fd18d0d01492e", ledger: 22893969, @@ -254,7 +254,7 @@ describe("server.js trans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DTXvs0r4N27zYlAAAAAwFdVZEAAAAAAAAAAIUAEW3jQt3+fbT6nCASA1/8RWdp9fJ2woxqPHZPQUH/AAAAAlS1mHEBB/zoAAAAHgAAAAYAAAABAAAAAIQ/AS7GRUBBd96ykumKKUFE92+oiwRuJ7KXuvPwwTQWAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAV1VkQAAAAAAAAAAhQARbeNC3f59tPqcIBIDX/xFZ2n18nbCjGo8dk9BQf8AAAACVLWYcQEH/OgAAAAeAAAABQAAAAEAAAAAhD8BLsZFQEF33rKS6YopQUT3b6iLBG4nspe68/DBNBYAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", }; this.axiosMock @@ -279,8 +279,8 @@ describe("server.js transaction tests", function () { const response = { _links: { transaction: { - href: "https://horizon.stellar.org/transactions/6a22d6896140f6f330ef19086827df0780eb2ad3324f3271b38c70cb1cba1c3d" - } + href: "https://horizon.stellar.org/transactions/6a22d6896140f6f330ef19086827df0780eb2ad3324f3271b38c70cb1cba1c3d", + }, }, hash: "6a22d6896140f6f330ef19086827df0780eb2ad3324f3271b38c70cb1cba1c3d", ledger: 22894978, @@ -289,7 +289,7 @@ describe("server.js transaction tests", function () { result_xdr: "AAAAAAAAAZAAAAAAAAAABAAAAAAAAAAGAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAAAAAAAAAAACAAAAAAAAAAMAAAAAAAAAAAAAAAIAAAAA", result_meta_xdr: - "AAAAAQAAAAIAAAADAV1ZggAAAAAAAAAAhQARbeNC3f59tPqcIBIDX/xFZ2n18nbCjGo8dk9BQf8AAAACVLWW4QEH/OgAAAAeAAAABQAAAAEAAAAAhD8BLsZFQEF33rKS6YopQUT3b6iLBG4nspe68/DBNBYAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBXVmC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BNBYAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBXVmCAAAAAAAAAACFABFt40Ld/n20+pwgEgNf/EVnafXydsKMajx2T0FB/wAAAAJUtZbhAQf86AAAAB8AAAAFAAAAAQAAAACEPwEuxkVAQXfespLpiilBRPdvqIsEbieyl7rz8ME0FgAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAIAAAADAVqyvQAAAAEAAAAAhQARbeNC3f59tPqcIBIDX/xFZ2n18nbCjGo8dk9BQf8AAAABQkFUAAAAAABGStPbx5szphDKFVmLW22XCr92TqKNOnJM24cgyBSn4QAAAAAAAAAAf/////////8AAAABAAAAAAAAAAAAAAABAV1ZggAAAAEAAAAAhQARbeNC3f59tPqcIBIDX/xFZ2n18nbCjGo8dk9BQf8AAAABQkFUAAAAAABGStPbx5szphDKFVmLW22XCr92TqKNOnJM24cgyBSn4QAAAAAAAAAAf/////////8AAAABAAAAAAAAAAAAAAACAAAAAwFdWYIAAAAAAAAAAIUAEW3jQt3+fbT6nCASA1/8RWdp9fJ2woxqPHZPQUH/AAAAAlS1luEBB/zoAAAAHwAAAAUAAAABAAAAAIQ/AS7GRUBBd96ykumKKUFE92+oiwRuJ7KXuvPwwTQWAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAV1ZggAAAAAAAAAAhQARbeNC3f59tPqcIBIDX/xFZ2n18nbCjGo8dk9BQf8AAAACVLWW4QEH/OgAAAAfAAAABQAAAAEAAAAAhD8BLsZFQEF33rKS6YopQUT3b6iLBG4nspe68/DBNBYAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", }; this.axiosMock @@ -334,7 +334,7 @@ describe("server.js transaction tests", function () { ) .returns( Promise.reject({ - response: { status: 404, statusText: "NotFound", data: {} } + response: { status: 404, statusText: "NotFound", data: {} }, }) ) .once(); diff --git a/test/unit/stellar_toml_resolver_test.js b/test/unit/stellar_toml_resolver_test.js index 198fa70c3..62a2b5142 100644 --- a/test/unit/stellar_toml_resolver_test.js +++ b/test/unit/stellar_toml_resolver_test.js @@ -26,7 +26,7 @@ describe("stellar_toml_resolver.js tests", function () { # The endpoint which clients should query to resolve stellar addresses # for users on your domain. FEDERATION_SERVER="https://api.stellar.org/federation" -` +`, }) ); @@ -48,12 +48,12 @@ FEDERATION_SERVER="https://api.stellar.org/federation" # The endpoint which clients should query to resolve stellar addresses # for users on your domain. FEDERATION_SERVER="http://api.stellar.org/federation" -` +`, }) ); StellarSdk.StellarTomlResolver.resolve("acme.com", { - allowHttp: true + allowHttp: true, }).then((stellarToml) => { expect(stellarToml.FEDERATION_SERVER).equals( "http://api.stellar.org/federation" @@ -74,7 +74,7 @@ FEDERATION_SERVER="http://api.stellar.org/federation" # The endpoint which clients should query to resolve stellar addresses # for users on your domain. FEDERATION_SERVER="http://api.stellar.org/federation" -` +`, }) ); @@ -96,7 +96,7 @@ FEDERATION_SERVER="http://api.stellar.org/federation" /# The endpoint which clients should query to resolve stellar addresses # for users on your domain. FEDERATION_SERVER="https://api.stellar.org/federation" -` +`, }) ); @@ -129,7 +129,7 @@ FEDERATION_SERVER="https://api.stellar.org/federation" }) .listen(4444, () => { StellarSdk.StellarTomlResolver.resolve("localhost:4444", { - allowHttp: true + allowHttp: true, }) .should.be.rejectedWith( /stellar.toml file exceeds allowed size of [0-9]+/ @@ -153,7 +153,7 @@ FEDERATION_SERVER="https://api.stellar.org/federation" }) .listen(4444, () => { StellarSdk.StellarTomlResolver.resolve("localhost:4444", { - allowHttp: true + allowHttp: true, }) .should.be.rejectedWith(/timeout of 1000ms exceeded/) .notify(done) @@ -177,7 +177,7 @@ FEDERATION_SERVER="https://api.stellar.org/federation" .listen(4444, () => { StellarSdk.StellarTomlResolver.resolve("localhost:4444", { allowHttp: true, - timeout: 1000 + timeout: 1000, }) .should.be.rejectedWith(/timeout of 1000ms exceeded/) .notify(done) diff --git a/test/unit/utils_test.js b/test/unit/utils_test.js index d9021d1c9..4dc8feb61 100644 --- a/test/unit/utils_test.js +++ b/test/unit/utils_test.js @@ -11,7 +11,7 @@ describe("Utils", function () { clock = sinon.useFakeTimers(); txBuilderOpts = { fee: 100, - networkPassphrase: StellarSdk.Networks.TESTNET + networkPassphrase: StellarSdk.Networks.TESTNET, }; }); @@ -233,15 +233,15 @@ describe("Utils", function () { networkPassphrase: StellarSdk.Networks.TESTNET, timebounds: { minTime: 0, - maxTime: 0 - } + maxTime: 0, + }, } ) .addOperation( StellarSdk.Operation.payment({ destination: clientKP.publicKey(), asset: StellarSdk.Asset.native(), - amount: "10.000" + amount: "10.000", }) ) .build(); @@ -317,7 +317,7 @@ describe("Utils", function () { tx: transaction, clientAccountID: clientKP.publicKey(), matchedHomeDomain: "SDF", - memo: null + memo: null, }); }); @@ -355,7 +355,7 @@ describe("Utils", function () { tx: transaction, clientAccountID: clientKP.publicKey(), matchedHomeDomain: "SDF", - memo: clientMemo + memo: clientMemo, }); }); @@ -393,7 +393,7 @@ describe("Utils", function () { tx: transaction, clientAccountID: muxedAddress, matchedHomeDomain: "SDF", - memo: null + memo: null, }); }); @@ -412,7 +412,7 @@ describe("Utils", function () { source: clientMuxedAddress, name: "testanchor.stellar.org auth", value: randomBytes(48).toString("base64"), - withMuxing: true + withMuxing: true, }) ) .addMemo(new StellarSdk.Memo.id("5842698851377328257")) @@ -453,7 +453,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "SDF-test auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -567,7 +567,7 @@ describe("Utils", function () { .addOperation( StellarSdk.Operation.manageData({ name: "SDF auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -600,7 +600,7 @@ describe("Utils", function () { .addOperation( StellarSdk.Operation.accountMerge({ destination: keypair.publicKey(), - source: keypair.publicKey() + source: keypair.publicKey(), }) ) .setTimeout(30) @@ -640,14 +640,14 @@ describe("Utils", function () { networkPassphrase, timebounds: { minTime: now, - maxTime: "0" - } + maxTime: "0", + }, }) .addOperation( StellarSdk.Operation.manageData({ name: `${anchorName} auth`, value, - source: clientKeypair.publicKey() + source: clientKeypair.publicKey(), }) ) .build(); @@ -691,7 +691,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ name: "SDF auth", value: randomBytes(64), - source: "GBDIT5GUJ7R5BXO3GJHFXJ6AZ5UQK6MNOIDMPQUSMXLIHTUNR2Q5CFNF" + source: "GBDIT5GUJ7R5BXO3GJHFXJ6AZ5UQK6MNOIDMPQUSMXLIHTUNR2Q5CFNF", }) ) .setTimeout(30) @@ -725,7 +725,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ name: "SDF auth", value: null, - source: "GBDIT5GUJ7R5BXO3GJHFXJ6AZ5UQK6MNOIDMPQUSMXLIHTUNR2Q5CFNF" + source: "GBDIT5GUJ7R5BXO3GJHFXJ6AZ5UQK6MNOIDMPQUSMXLIHTUNR2Q5CFNF", }) ) .setTimeout(30) @@ -821,7 +821,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -847,7 +847,7 @@ describe("Utils", function () { tx: transactionRoundTripped, clientAccountID: clientKP.publicKey(), matchedHomeDomain: "testanchor.stellar.org", - memo: null + memo: null, }); }); @@ -863,7 +863,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -889,7 +889,7 @@ describe("Utils", function () { tx: transactionRoundTripped, clientAccountID: clientKP.publicKey(), matchedHomeDomain: "testanchor.stellar.org", - memo: null + memo: null, }); }); @@ -905,7 +905,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -939,7 +939,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -974,7 +974,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "does.not.match auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -1009,7 +1009,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "does.not.match auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -1044,14 +1044,14 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "SDF auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.manageData({ source: serverKP.publicKey(), name: "a key", - value: "a value" + value: "a value", }) ) .setTimeout(30) @@ -1077,7 +1077,7 @@ describe("Utils", function () { tx: transactionRoundTripped, clientAccountID: clientKP.publicKey(), matchedHomeDomain: "SDF", - memo: null + memo: null, }); }); @@ -1093,14 +1093,14 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "SDF auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "a key", - value: "a value" + value: "a value", }) ) .setTimeout(30) @@ -1140,13 +1140,13 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "SDF auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.bumpSequence({ source: clientKP.publicKey(), - bumpTo: "0" + bumpTo: "0", }) ) .setTimeout(30) @@ -1186,14 +1186,14 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.manageData({ source: serverKP.publicKey(), name: "web_auth_domain", - value: "unexpected_web_auth_domain" + value: "unexpected_web_auth_domain", }) ) .setTimeout(30) @@ -1233,14 +1233,14 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "web_auth_domain", - value: "testanchor.stellar.org" + value: "testanchor.stellar.org", }) ) .setTimeout(30) @@ -1280,7 +1280,7 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .setTimeout(30) @@ -1306,7 +1306,7 @@ describe("Utils", function () { tx: transactionRoundTripped, clientAccountID: clientKP.publicKey(), matchedHomeDomain: "testanchor.stellar.org", - memo: null + memo: null, }); }); @@ -1322,14 +1322,14 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.manageData({ source: serverKP.publicKey(), name: "web_auth_domain", - value: "auth.stellar.org" + value: "auth.stellar.org", }) ) .setTimeout(30) @@ -1355,7 +1355,7 @@ describe("Utils", function () { tx: transactionRoundTripped, clientAccountID: clientKP.publicKey(), matchedHomeDomain: "testanchor.stellar.org", - memo: null + memo: null, }); }); @@ -1371,14 +1371,14 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.manageData({ source: serverKP.publicKey(), name: "nonWebAuthDomainKey", - value: null + value: null, }) ) .setTimeout(30) @@ -1404,7 +1404,7 @@ describe("Utils", function () { tx: transactionRoundTripped, clientAccountID: clientKP.publicKey(), matchedHomeDomain: "testanchor.stellar.org", - memo: null + memo: null, }); }); @@ -1422,14 +1422,14 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.manageData({ source: clientSigningKeypair.publicKey(), name: "client_domain", - value: "testdomain" + value: "testdomain", }) ) .setTimeout(30) @@ -1461,12 +1461,12 @@ describe("Utils", function () { this.operation = StellarSdk.Operation.manageData({ source: this.clientKP1.publicKey(), name: "SDF-test auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }); this.txBuilderOpts = { fee: 100, - networkPassphrase: StellarSdk.Networks.TESTNET + networkPassphrase: StellarSdk.Networks.TESTNET, }; }); @@ -1574,7 +1574,7 @@ describe("Utils", function () { const threshold = 3; const signerSummary = [ newClientSigner(this.clientKP1.publicKey(), 1), - newClientSigner(this.clientKP2.publicKey(), 2) + newClientSigner(this.clientKP2.publicKey(), 2), ]; expect( @@ -1616,7 +1616,7 @@ describe("Utils", function () { const signerSummary = [ newClientSigner(this.clientKP1.publicKey(), 1), newClientSigner(this.clientKP2.publicKey(), 2), - newClientSigner(this.clientKP3.publicKey(), 2) + newClientSigner(this.clientKP3.publicKey(), 2), ]; expect( @@ -1667,7 +1667,7 @@ describe("Utils", function () { newClientSigner(this.clientKP3.publicKey(), 2), newClientSigner(preauthTxHash, 10), newClientSigner(xHash, 10), - newClientSigner(unknownSignerType, 10) + newClientSigner(unknownSignerType, 10), ]; expect( @@ -1709,7 +1709,7 @@ describe("Utils", function () { const signerSummary = [ newClientSigner(this.clientKP1.publicKey(), 1), newClientSigner(this.clientKP2.publicKey(), 2), - newClientSigner(this.clientKP3.publicKey(), 2) + newClientSigner(this.clientKP3.publicKey(), 2), ]; expect(() => @@ -1753,7 +1753,7 @@ describe("Utils", function () { const threshold = 10; const signerSummary = [ newClientSigner(this.clientKP1.publicKey(), 1), - newClientSigner(this.clientKP2.publicKey(), 2) + newClientSigner(this.clientKP2.publicKey(), 2), ]; expect(() => @@ -1825,12 +1825,12 @@ describe("Utils", function () { this.operation = StellarSdk.Operation.manageData({ source: this.clientKP1.publicKey(), name: "SDF-test auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }); this.txBuilderOpts = { fee: 100, - networkPassphrase: StellarSdk.Networks.TESTNET + networkPassphrase: StellarSdk.Networks.TESTNET, }; }); @@ -2361,7 +2361,7 @@ describe("Utils", function () { const clientSigners = [ this.clientKP1.publicKey(), - this.clientKP2.publicKey() + this.clientKP2.publicKey(), ]; expect(() => @@ -2520,21 +2520,21 @@ describe("Utils", function () { StellarSdk.Operation.manageData({ source: clientKP.publicKey(), name: "testanchor.stellar.org auth", - value: randomBytes(48).toString("base64") + value: randomBytes(48).toString("base64"), }) ) .addOperation( StellarSdk.Operation.manageData({ source: clientSigningKeypair.publicKey(), name: "client_domain", - value: "testdomain" + value: "testdomain", }) ) .addOperation( StellarSdk.Operation.manageData({ source: clientSigningKeypair.publicKey(), name: "client_domain", - value: "testdomain2" + value: "testdomain2", }) ) .setTimeout(30) @@ -2639,7 +2639,7 @@ describe("Utils", function () { const expectedSignatures = [ this.keypair1.publicKey(), - this.keypair2.publicKey() + this.keypair2.publicKey(), ]; expect( StellarSdk.Utils.gatherTxSigners(this.transaction, expectedSignatures) @@ -2658,12 +2658,12 @@ describe("Utils", function () { const expectedSignatures = [ this.keypair1.publicKey(), - this.keypair2.publicKey() + this.keypair2.publicKey(), ]; expect( StellarSdk.Utils.gatherTxSigners(this.transaction, [ this.keypair1.publicKey(), - this.keypair2.publicKey() + this.keypair2.publicKey(), ]) ).to.eql(expectedSignatures); }); @@ -2674,7 +2674,7 @@ describe("Utils", function () { let wrongSignatures = [ StellarSdk.Keypair.random().publicKey(), StellarSdk.Keypair.random().publicKey(), - StellarSdk.Keypair.random().publicKey() + StellarSdk.Keypair.random().publicKey(), ]; expect( @@ -2686,7 +2686,7 @@ describe("Utils", function () { expect( StellarSdk.Utils.gatherTxSigners(this.transaction, [ this.keypair1.publicKey(), - this.keypair2.publicKey() + this.keypair2.publicKey(), ]) ).to.eql([]); }); @@ -2698,7 +2698,7 @@ describe("Utils", function () { expect(() => StellarSdk.Utils.gatherTxSigners(this.transaction, [ preauthTxHash, - this.keypair1.publicKey() + this.keypair1.publicKey(), ]) ).to.throw( StellarSdk.InvalidSep10ChallengeError, @@ -2713,7 +2713,7 @@ describe("Utils", function () { expect(() => StellarSdk.Utils.gatherTxSigners(this.transaction, [ invalidGHash, - this.keypair1.publicKey() + this.keypair1.publicKey(), ]) ).to.throw( StellarSdk.InvalidSep10ChallengeError,