@bithomp/xrpl-api 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,7 @@ interface SubmitPaymentTransactionV1Interface {
29
29
  memos?: FormattedMemo[];
30
30
  secret: string;
31
31
  fee?: string;
32
+ sequence?: number;
32
33
  }
33
34
  export declare function submitPaymentTransactionV1(data: SubmitPaymentTransactionV1Interface, definitions?: XrplDefinitionsBase, validateTx?: boolean): Promise<TransactionResponse | FormattedTransaction | ErrorResponse>;
34
35
  export declare function getAccountPaymentParams(account: string, connection?: Connection): Promise<AccountPaymentParamsInterface | ErrorResponse>;
@@ -195,7 +195,12 @@ async function submitPaymentTransactionV1(data, definitions, validateTx) {
195
195
  else {
196
196
  transaction.Fee = submitParams.fee;
197
197
  }
198
- transaction.Sequence = submitParams.sequence;
198
+ if (data.sequence) {
199
+ transaction.Sequence = data.sequence;
200
+ }
201
+ else {
202
+ transaction.Sequence = submitParams.sequence;
203
+ }
199
204
  transaction.LastLedgerSequence = submitParams.lastLedgerSequence;
200
205
  const wallet = (0, wallet_1.walletFromSeed)(data.secret, { seedAddress: transaction.Account });
201
206
  const signedTransaction = (0, wallet_1.signTransaction)(wallet, transaction, false, definitions, validateTx).tx_blob;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -39,7 +39,7 @@
39
39
  "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
40
40
  "lint": "eslint -c .eslintrc.json --ext .ts src/",
41
41
  "prepare": "npm run build",
42
- "-prepublishOnly": "npm test && npm run lint",
42
+ "prepublishOnly": "npm test && npm run lint",
43
43
  "preversion": "npm run lint",
44
44
  "version": "npm run format && git add -A src",
45
45
  "postversion": "git push && git push --tags"
@@ -60,23 +60,23 @@
60
60
  "devDependencies": {
61
61
  "@types/chai": "^4.3.16",
62
62
  "@types/chai-as-promised": "^7.1.8",
63
- "@types/lodash": "^4.17.4",
63
+ "@types/lodash": "^4.17.5",
64
64
  "@types/mocha": "^10.0.6",
65
65
  "@types/nconf": "^0.10.6",
66
- "@types/node": "^20.14.0",
67
- "@typescript-eslint/eslint-plugin": "^7.12.0",
68
- "@typescript-eslint/parser": "^7.12.0",
66
+ "@types/node": "^20.14.6",
67
+ "@typescript-eslint/eslint-plugin": "^7.13.1",
68
+ "@typescript-eslint/parser": "^7.13.1",
69
69
  "chai": "^4.4.1",
70
70
  "chai-as-promised": "^7.1.2",
71
71
  "eslint": "^8.57.0",
72
72
  "eslint-config-prettier": "^9.1.0",
73
- "eslint-plugin-chai-friendly": "^0.8.0",
73
+ "eslint-plugin-chai-friendly": "^1.0.0",
74
74
  "eslint-plugin-import": "^2.29.1",
75
- "eslint-plugin-n": "^17.7.0",
75
+ "eslint-plugin-n": "^17.9.0",
76
76
  "eslint-plugin-promise": "^6.2.0",
77
77
  "mocha": "^10.4.0",
78
78
  "nconf": "^0.12.1",
79
- "ts-jest": "^29.1.4",
79
+ "ts-jest": "^29.1.5",
80
80
  "ts-node": "^10.9.2",
81
81
  "typescript": "^5.4.5"
82
82
  }