@stellar/typescript-wallet-sdk 1.1.0-alpha.2 → 1.1.0

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.
Files changed (79) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/docs/WalletGuide.md +5 -0
  3. package/lib/bundle.js +30068 -4748
  4. package/lib/bundle.js.map +1 -1
  5. package/lib/index.d.ts +26 -7
  6. package/lib/walletSdk/Asset/index.d.ts +27 -0
  7. package/lib/walletSdk/Exceptions/index.d.ts +56 -0
  8. package/lib/walletSdk/Types/anchor.d.ts +148 -0
  9. package/lib/walletSdk/Types/auth.d.ts +35 -0
  10. package/lib/walletSdk/Types/horizon.d.ts +34 -0
  11. package/lib/walletSdk/Types/index.d.ts +30 -0
  12. package/lib/walletSdk/Types/sep24.d.ts +30 -0
  13. package/lib/walletSdk/Types/utils.d.ts +77 -0
  14. package/lib/walletSdk/Types/watcher.d.ts +30 -0
  15. package/lib/walletSdk/Utils/camelToSnakeCase.d.ts +2 -0
  16. package/lib/walletSdk/Utils/getResultCode.d.ts +1 -0
  17. package/lib/walletSdk/Utils/index.d.ts +3 -0
  18. package/lib/walletSdk/Utils/toml.d.ts +3 -0
  19. package/lib/walletSdk/Utils/url.d.ts +1 -0
  20. package/lib/walletSdk/Watcher/index.d.ts +21 -42
  21. package/lib/walletSdk/anchor/Sep24.d.ts +48 -0
  22. package/lib/walletSdk/anchor/index.d.ts +12 -75
  23. package/lib/walletSdk/auth/WalletSigner.d.ts +4 -3
  24. package/lib/walletSdk/auth/index.d.ts +14 -5
  25. package/lib/walletSdk/horizon/Account.d.ts +3 -6
  26. package/lib/walletSdk/horizon/AccountService.d.ts +46 -1
  27. package/lib/walletSdk/horizon/Stellar.d.ts +10 -1
  28. package/lib/walletSdk/horizon/index.d.ts +4 -0
  29. package/lib/walletSdk/horizon/transaction/TransactionBuilder.d.ts +20 -0
  30. package/lib/walletSdk/index.d.ts +17 -15
  31. package/lib/walletSdk/interactive/index.d.ts +3 -14
  32. package/lib/walletSdk/recovery/index.d.ts +18 -0
  33. package/package.json +7 -1
  34. package/prettier.config.js +1 -0
  35. package/src/index.ts +39 -17
  36. package/src/walletSdk/Anchor/Sep24.ts +267 -0
  37. package/src/walletSdk/Anchor/index.ts +32 -201
  38. package/src/walletSdk/Asset/index.ts +58 -0
  39. package/src/walletSdk/Auth/WalletSigner.ts +23 -12
  40. package/src/walletSdk/Auth/index.ts +96 -49
  41. package/src/walletSdk/Exceptions/index.ts +148 -0
  42. package/src/walletSdk/{horizon → Horizon}/Account.ts +7 -9
  43. package/src/walletSdk/Horizon/AccountService.ts +96 -0
  44. package/src/walletSdk/Horizon/Stellar.ts +164 -0
  45. package/src/walletSdk/Horizon/Transaction/TransactionBuilder.ts +140 -0
  46. package/src/walletSdk/Horizon/index.ts +4 -0
  47. package/src/walletSdk/Recovery/index.ts +32 -0
  48. package/src/walletSdk/{Watcher/Types.ts → Types/anchor.ts} +114 -21
  49. package/src/walletSdk/Types/auth.ts +43 -0
  50. package/src/walletSdk/Types/horizon.ts +40 -0
  51. package/src/walletSdk/Types/index.ts +39 -0
  52. package/src/walletSdk/Types/sep24.ts +41 -0
  53. package/src/walletSdk/Types/utils.ts +77 -0
  54. package/src/walletSdk/Types/watcher.ts +34 -0
  55. package/src/walletSdk/Utils/camelToSnakeCase.ts +16 -0
  56. package/src/walletSdk/Utils/getResultCode.ts +5 -0
  57. package/src/walletSdk/Utils/index.ts +3 -0
  58. package/src/walletSdk/Utils/toml.ts +103 -0
  59. package/src/walletSdk/{util → Utils}/url.ts +1 -1
  60. package/src/walletSdk/Watcher/index.ts +137 -128
  61. package/src/walletSdk/index.ts +72 -55
  62. package/test/account.test.ts +19 -15
  63. package/test/accountService.test.ts +109 -0
  64. package/test/fixtures/TransactionsResponse.ts +144 -127
  65. package/test/stellar.test.ts +247 -0
  66. package/test/wallet.test.ts +196 -214
  67. package/tsconfig.json +3 -7
  68. package/webpack.config.js +2 -0
  69. package/lib/walletSdk/anchor/Types.d.ts +0 -75
  70. package/lib/walletSdk/util/sleep.d.ts +0 -1
  71. package/src/walletSdk/Anchor/Types.ts +0 -83
  72. package/src/walletSdk/exception/index.ts +0 -48
  73. package/src/walletSdk/horizon/AccountService.ts +0 -19
  74. package/src/walletSdk/horizon/Stellar.ts +0 -14
  75. package/src/walletSdk/horizon/constants.ts +0 -4
  76. package/src/walletSdk/interactive/index.ts +0 -105
  77. package/src/walletSdk/recovery/Recovery.ts +0 -6
  78. package/src/walletSdk/toml/index.ts +0 -179
  79. package/src/walletSdk/util/camelToSnakeCase.ts +0 -13
@@ -0,0 +1,103 @@
1
+ import { StellarTomlResolver } from "stellar-sdk";
2
+
3
+ import { TomlInfo } from "../Types";
4
+
5
+ export const parseToml = (toml: StellarTomlResolver.StellarToml): TomlInfo => {
6
+ const tomlDocumentation = toml["DOCUMENTATION"];
7
+ const documentation = {
8
+ orgName: tomlDocumentation["ORG_NAME"],
9
+ orgDba: tomlDocumentation["ORG_DBA"],
10
+ orgUrl: tomlDocumentation["ORG_URL"],
11
+ orgLogo: tomlDocumentation["ORG_LOGO"],
12
+ orgDescription: tomlDocumentation["ORG_DESCRIPTION"],
13
+ orgPhysicalAddress: tomlDocumentation["ORG_PHYSICAL_ADDRESS"],
14
+ orgPhysicalAddressAttestation:
15
+ tomlDocumentation["ORG_PHYSICAL_ADDRESS_ATTESTATION"],
16
+ orgPhoneNumber: tomlDocumentation["ORG_PHONE_NUMBER"],
17
+ orgPhoneNumberAttestation:
18
+ tomlDocumentation["ORG_PHONE_NUMBER_ATTESTATION"],
19
+ orgKeybase: tomlDocumentation["ORG_KEYBASE"],
20
+ orgTwitter: tomlDocumentation["ORG_TWITTER"],
21
+ orgGithub: tomlDocumentation["ORG_GITHUB"],
22
+ orgOfficialEmail: tomlDocumentation["ORG_OFFICIAL_EMAIL"],
23
+ orgSupportEmail: tomlDocumentation["ORG_SUPPORT_EMAIL"],
24
+ orgLicensingAuthority: tomlDocumentation["ORG_LICENSING_AUTHORITY"],
25
+ orgLicenseType: tomlDocumentation["ORG_LICENSE_TYPE"],
26
+ orgLicenseNumber: tomlDocumentation["ORG_LICENSE_NUMBER"],
27
+ };
28
+
29
+ const tomlPrincipals = toml["PRINCIPALS"] || [];
30
+ const principals = tomlPrincipals.map((tp) => {
31
+ return {
32
+ name: tp["name"],
33
+ email: tp["email"],
34
+ keybase: tp["keybase"],
35
+ telegram: tp["telegram"],
36
+ twitter: tp["twitter"],
37
+ github: tp["github"],
38
+ idPhotoHash: tp["id_photo_hash"],
39
+ verificationPhotoHash: tp["verification_photo_hash"],
40
+ };
41
+ });
42
+
43
+ const tomlCurrencies = toml["CURRENCIES"] || [];
44
+ const currencies = tomlCurrencies.map((tc) => {
45
+ return {
46
+ code: tc["code"],
47
+ codeTemplate: tc["code_template"],
48
+ issuer: tc["issuer"],
49
+ status: tc["status"],
50
+ displayDecimals: tc["display_decimals"],
51
+ name: tc["name"],
52
+ desc: tc["desc"],
53
+ conditions: tc["conditions"],
54
+ image: tc["image"],
55
+ fixedNumber: tc["fixed_number"],
56
+ maxNumber: tc["max_number"],
57
+ isUnlimited: tc["is_unlimited"],
58
+ isAssetAnchored: tc["is_asset_anchored"],
59
+ anchorAssetType: tc["anchor_asset_type"],
60
+ anchorAsset: tc["anchor_asset"],
61
+ attestationOfReserve: tc["attestation_of_reserve"],
62
+ redemptionInstructions: tc["redemption_instructions"],
63
+ collateralAddresses: tc["collateral_addresses"],
64
+ collateralAddressMessages: tc["collateral_address_messages"],
65
+ collateralAddressSignatures: tc["collateral_address_signatures"],
66
+ regulated: tc["regulated"],
67
+ approvalServer: tc["approval_server"],
68
+ approvalCriteria: tc["approval_criteria"],
69
+ };
70
+ });
71
+
72
+ const tomlValidators = toml["VALIDATORS"] || [];
73
+ const validators = tomlValidators.map((tv) => {
74
+ return {
75
+ alias: tv["ALIAS"],
76
+ displayName: tv["DISPLAY_NAME"],
77
+ publicKey: tv["PUBLIC_KEY"],
78
+ host: tv["HOST"],
79
+ history: tv["HISTORY"],
80
+ };
81
+ });
82
+
83
+ return {
84
+ version: toml["VERSION"],
85
+ networkPassphrase: toml["NETWORK_PASSPHRASE"],
86
+ federationServer: toml["FEDERATION_SERVER"],
87
+ authServer: toml["AUTH_SERVER"] as string,
88
+ transferServer: toml["TRANSFER_SERVER"],
89
+ transferServerSep24: toml["TRANSFER_SERVER_SEP0024"],
90
+ kycServer: toml["KYC_SERVER"],
91
+ webAuthEndpoint: toml["WEB_AUTH_ENDPOINT"],
92
+ signingKey: toml["SIGNING_KEY"],
93
+ horizonUrl: toml["HORIZON_URL"],
94
+ accounts: toml["ACCOUNTS"],
95
+ uriRequestSigningKey: toml["URI_REQUEST_SIGNING_KEY"],
96
+ directPaymentServer: toml["DIRECT_PAYMENT_SERVER"],
97
+ anchorQuoteServer: toml["ANCHOR_QUOTE_SERVER"],
98
+ documentation,
99
+ principals,
100
+ currencies,
101
+ validators,
102
+ };
103
+ };
@@ -7,6 +7,6 @@ if (typeof window === "undefined") {
7
7
  Url = window.URL;
8
8
  }
9
9
 
10
- export const getUrlDomain = (url) => {
10
+ export const getUrlDomain = (url: string) => {
11
11
  return new Url(url).host;
12
12
  };
@@ -1,7 +1,13 @@
1
1
  import isEqual from "lodash/isEqual";
2
2
 
3
- import { Anchor } from "walletSdk/Anchor";
4
- import { TransactionStatus, WatcherResponse } from "./Types";
3
+ import { Anchor } from "../Anchor";
4
+ import {
5
+ AnchorTransaction,
6
+ TransactionStatus,
7
+ WatchTransactionParams,
8
+ WatchTransactionsParams,
9
+ WatcherResponse,
10
+ } from "../Types";
5
11
 
6
12
  interface WatchRegistryAsset {
7
13
  [id: string]: boolean;
@@ -30,7 +36,7 @@ export class Watcher {
30
36
  private _oneTransactionWatcher: {
31
37
  [assetCode: string]: {
32
38
  [id: string]: ReturnType<typeof setTimeout>;
33
- }
39
+ };
34
40
  };
35
41
  private _allTransactionsWatcher?: ReturnType<typeof setTimeout>;
36
42
  private _watchOneTransactionRegistry: WatchOneTransactionRegistry;
@@ -50,41 +56,42 @@ export class Watcher {
50
56
  }
51
57
 
52
58
  /**
53
- * Watch all transactions returned from a transfer server. When new or
54
- * updated transactions come in, run an `onMessage` callback.
55
- *
56
- * On initial load, it'll return ALL pending transactions via onMessage.
57
- * Subsequent messages will be any one of these events:
58
- * - Any new transaction appears
59
- * - Any of the initial pending transactions change any state
60
- *
61
- * You may also provide an array of transaction ids, `watchlist`, and this
62
- * watcher will always react to transactions whose ids are in the watchlist.
63
- */
64
- watchAllTransactions(params: {
65
- authToken: string;
66
- assetCode: string;
67
- onMessage: (transaction) => void;
68
- onError: (error) => void; // TOOD - add :Transaction | Error type
69
- watchlist?: string[];
70
- timeout?: number;
71
- isRetry?: boolean;
72
- noOlderThan?: string;
73
- kind?: string;
74
- lang?: string;
75
- }): WatcherResponse {
76
- const {
59
+ * Watch all transactions returned from a transfer server. When new or
60
+ * updated transactions come in, run an `onMessage` callback.
61
+ *
62
+ * On initial load, it'll return ALL pending transactions via onMessage.
63
+ * Subsequent messages will be any one of these events:
64
+ * - Any new transaction appears
65
+ * - Any of the initial pending transactions change any state
66
+ *
67
+ * You may also provide an array of transaction ids, `watchlist`, and this
68
+ * watcher will always react to transactions whose ids are in the watchlist.
69
+ */
70
+ watchAllTransactions({
71
+ authToken,
72
+ assetCode,
73
+ onMessage,
74
+ onError,
75
+ watchlist = [],
76
+ timeout = 5000,
77
+ isRetry = false,
78
+ lang = this.anchor.language,
79
+ kind,
80
+ noOlderThan,
81
+ }: WatchTransactionsParams): WatcherResponse {
82
+ const allParams = {
77
83
  authToken,
78
84
  assetCode,
79
85
  onMessage,
80
86
  onError,
81
- watchlist = [],
82
- timeout = 5000,
83
- isRetry = false,
84
- lang = this.anchor.language,
85
- ...otherParams
86
- } = params;
87
-
87
+ watchlist,
88
+ timeout,
89
+ isRetry,
90
+ lang,
91
+ kind,
92
+ noOlderThan,
93
+ };
94
+
88
95
  // make an object map out of watchlist
89
96
  const watchlistMap = watchlist.reduce(
90
97
  (memo, id: string) => ({ ...memo, [id]: true }),
@@ -93,10 +100,10 @@ export class Watcher {
93
100
 
94
101
  // make sure to initiate registries for the given asset code
95
102
  // to prevent 'Cannot read properties of undefined' errors
96
- if(!this._transactionsRegistry[assetCode]) {
103
+ if (!this._transactionsRegistry[assetCode]) {
97
104
  this._transactionsRegistry[assetCode] = {};
98
105
  }
99
- if(!this._transactionsIgnoredRegistry[assetCode]) {
106
+ if (!this._transactionsIgnoredRegistry[assetCode]) {
100
107
  this._transactionsIgnoredRegistry[assetCode] = {};
101
108
  }
102
109
 
@@ -105,74 +112,76 @@ export class Watcher {
105
112
  this._watchAllTransactionsRegistry[assetCode] = true;
106
113
  }
107
114
 
108
- this.anchor.getTransactionsForAsset({ authToken, assetCode, lang, ...otherParams })
109
- .then((transactions: any[]) => { // TOOD - replace with Transaction[] type
115
+ this.anchor
116
+ .sep24()
117
+ .getTransactionsForAsset({
118
+ authToken,
119
+ assetCode,
120
+ lang,
121
+ kind,
122
+ noOlderThan,
123
+ })
124
+ .then((transactions: AnchorTransaction[]) => {
110
125
  // make sure we're still watching
111
126
  if (!this._watchAllTransactionsRegistry[assetCode]) {
112
127
  return;
113
128
  }
114
129
 
115
130
  try {
116
- const newTransactions = transactions.filter(
117
- (transaction) => {
118
- const isInProgress =
119
- transaction.status.indexOf("pending") === 0 ||
120
- transaction.status === TransactionStatus.incomplete;
121
- const registeredTransaction = this._transactionsRegistry[
122
- assetCode
123
- ][transaction.id];
124
-
125
- // if this is the first watch, only keep the pending ones
126
- if (!isRetry) {
127
- // always show transactions on the watchlist
128
- if (watchlistMap[transaction.id]) {
129
- return true;
130
- }
131
-
132
- // if we're not in progress, then save this in an ignore reg
133
- if (!isInProgress) {
134
- this._transactionsIgnoredRegistry[assetCode][
135
- transaction.id
136
- ] = transaction;
137
- }
138
-
139
- return isInProgress;
131
+ const newTransactions = transactions.filter((transaction) => {
132
+ const isInProgress =
133
+ transaction.status.indexOf("pending") === 0 ||
134
+ transaction.status === TransactionStatus.incomplete;
135
+ const registeredTransaction =
136
+ this._transactionsRegistry[assetCode][transaction.id];
137
+
138
+ // if this is the first watch, only keep the pending ones
139
+ if (!isRetry) {
140
+ // always show transactions on the watchlist
141
+ if (watchlistMap[transaction.id]) {
142
+ return true;
140
143
  }
141
144
 
142
- // if we've had the transaction before, only report updates
143
- if (registeredTransaction) {
144
- return !isEqual(registeredTransaction, transaction);
145
+ // if we're not in progress, then save this in an ignore reg
146
+ if (!isInProgress) {
147
+ this._transactionsIgnoredRegistry[assetCode][transaction.id] =
148
+ transaction;
145
149
  }
146
150
 
147
- // if it's NOT a registered transaction, and it's not the first
148
- // roll, maybe it's a new transaction that achieved a final
149
- // status immediately so register that!
150
- if (
151
- [
152
- TransactionStatus.completed,
153
- TransactionStatus.refunded,
154
- TransactionStatus.expired,
155
- TransactionStatus.error,
156
- ].includes(transaction.status) &&
157
- isRetry &&
158
- !this._transactionsIgnoredRegistry[assetCode][transaction.id]
159
- ) {
160
- return true;
161
- }
151
+ return isInProgress;
152
+ }
162
153
 
163
- // always use in progress transactions
164
- if (isInProgress) {
165
- return true;
166
- }
154
+ // if we've had the transaction before, only report updates
155
+ if (registeredTransaction) {
156
+ return !isEqual(registeredTransaction, transaction);
157
+ }
158
+
159
+ // if it's NOT a registered transaction, and it's not the first
160
+ // roll, maybe it's a new transaction that achieved a final
161
+ // status immediately so register that!
162
+ if (
163
+ [
164
+ TransactionStatus.completed,
165
+ TransactionStatus.refunded,
166
+ TransactionStatus.expired,
167
+ TransactionStatus.error,
168
+ ].includes(transaction.status) &&
169
+ isRetry &&
170
+ !this._transactionsIgnoredRegistry[assetCode][transaction.id]
171
+ ) {
172
+ return true;
173
+ }
174
+
175
+ // always use in progress transactions
176
+ if (isInProgress) {
177
+ return true;
178
+ }
167
179
 
168
- return false;
169
- },
170
- );
180
+ return false;
181
+ });
171
182
 
172
183
  newTransactions.forEach((transaction) => {
173
- this._transactionsRegistry[assetCode][
174
- transaction.id
175
- ] = transaction;
184
+ this._transactionsRegistry[assetCode][transaction.id] = transaction;
176
185
 
177
186
  if (transaction.status === TransactionStatus.error) {
178
187
  onError(transaction);
@@ -191,9 +200,9 @@ export class Watcher {
191
200
  }
192
201
  this._allTransactionsWatcher = setTimeout(() => {
193
202
  this.watchAllTransactions({
194
- ...params,
203
+ ...allParams,
195
204
  isRetry: true,
196
- });
205
+ });
197
206
  }, timeout);
198
207
  })
199
208
  .catch((e) => {
@@ -212,9 +221,9 @@ export class Watcher {
212
221
  }
213
222
 
214
223
  this.watchAllTransactions({
215
- ...params,
224
+ ...allParams,
216
225
  isRetry: true,
217
- });
226
+ });
218
227
  },
219
228
  stop: () => {
220
229
  if (this._allTransactionsWatcher) {
@@ -228,41 +237,41 @@ export class Watcher {
228
237
  }
229
238
 
230
239
  /**
231
- * Watch a transaction until it stops pending. Takes three callbacks:
232
- * * onMessage - When the transaction comes back as pending_ or incomplete.
233
- * * onSuccess - When the transaction comes back as completed / refunded / expired.
234
- * * onError - When there's a runtime error, or the transaction comes back as
235
- * no_market / too_small / too_large / error.
236
- */
237
- watchOneTransaction(params: {
238
- authToken: string;
239
- assetCode: string;
240
- id: string;
241
- onMessage: (transaction) => void;
242
- onSuccess: (transaction) => void;
243
- onError: (error) => void; // TOOD - add :Transaction | Error type
244
- timeout?: number;
245
- isRetry?: boolean;
246
- lang?: string;
247
- }): WatcherResponse {
248
- const {
240
+ * Watch a transaction until it stops pending. Takes three callbacks:
241
+ * * onMessage - When the transaction comes back as pending_ or incomplete.
242
+ * * onSuccess - When the transaction comes back as completed / refunded / expired.
243
+ * * onError - When there's a runtime error, or the transaction comes back as
244
+ * no_market / too_small / too_large / error.
245
+ */
246
+ watchOneTransaction({
247
+ authToken,
248
+ assetCode,
249
+ id,
250
+ onMessage,
251
+ onSuccess,
252
+ onError,
253
+ timeout = 5000,
254
+ isRetry = false,
255
+ lang = this.anchor.language,
256
+ }: WatchTransactionParams): WatcherResponse {
257
+ const allParams = {
249
258
  authToken,
250
259
  assetCode,
251
260
  id,
252
261
  onMessage,
253
262
  onSuccess,
254
263
  onError,
255
- timeout = 5000,
256
- isRetry = false,
257
- lang = this.anchor.language,
258
- } = params;
264
+ timeout,
265
+ isRetry,
266
+ lang,
267
+ };
259
268
 
260
269
  // make sure to initiate registries for the given asset code
261
270
  // to prevent 'Cannot read properties of undefined' errors
262
- if(!this._transactionsRegistry[assetCode]) {
271
+ if (!this._transactionsRegistry[assetCode]) {
263
272
  this._transactionsRegistry[assetCode] = {};
264
273
  }
265
- if(!this._oneTransactionWatcher[assetCode]) {
274
+ if (!this._oneTransactionWatcher[assetCode]) {
266
275
  this._oneTransactionWatcher[assetCode] = {};
267
276
  }
268
277
 
@@ -275,16 +284,17 @@ export class Watcher {
275
284
  }
276
285
 
277
286
  // do this all asynchronously (since this func needs to return a cancel fun)
278
- this.anchor.getTransactionBy({ authToken, id, lang })
279
- .then((transaction) => {
287
+ this.anchor
288
+ .sep24()
289
+ .getTransactionBy({ authToken, id, lang })
290
+ .then((transaction: AnchorTransaction) => {
280
291
  // make sure we're still watching
281
292
  if (!this._watchOneTransactionRegistry[assetCode]?.[id]) {
282
293
  return;
283
294
  }
284
295
 
285
- const registeredTransaction = this._transactionsRegistry[assetCode][
286
- transaction.id
287
- ];
296
+ const registeredTransaction =
297
+ this._transactionsRegistry[assetCode][transaction.id];
288
298
 
289
299
  // if we've had the transaction before, only report if there is a change
290
300
  if (
@@ -306,16 +316,16 @@ export class Watcher {
306
316
 
307
317
  this._oneTransactionWatcher[assetCode][id] = setTimeout(() => {
308
318
  this.watchOneTransaction({
309
- ...params,
319
+ ...allParams,
310
320
  isRetry: true,
311
321
  });
312
322
  }, timeout);
313
323
  onMessage(transaction);
314
324
  } else if (
315
325
  [
316
- TransactionStatus.completed,
326
+ TransactionStatus.completed,
317
327
  TransactionStatus.refunded,
318
- TransactionStatus.expired
328
+ TransactionStatus.expired,
319
329
  ].includes(transaction.status)
320
330
  ) {
321
331
  onSuccess(transaction);
@@ -339,7 +349,7 @@ export class Watcher {
339
349
  }
340
350
 
341
351
  this.watchOneTransaction({
342
- ...params,
352
+ ...allParams,
343
353
  isRetry: true,
344
354
  });
345
355
  },
@@ -351,5 +361,4 @@ export class Watcher {
351
361
  },
352
362
  };
353
363
  }
354
-
355
364
  }