passkey-kit 0.10.12 → 0.10.13

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 (2) hide show
  1. package/package.json +3 -3
  2. package/src/kit.ts +2 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passkey-kit",
3
- "version": "0.10.12",
3
+ "version": "0.10.13",
4
4
  "description": "A helper library for creating and using smart wallet accounts on the Stellar blockchain.",
5
5
  "author": "Tyler van der Hoeven",
6
6
  "license": "MIT",
@@ -12,8 +12,8 @@
12
12
  "@stellar/stellar-sdk": "^13.1.0",
13
13
  "base64url": "^3.0.1",
14
14
  "buffer": "^6.0.3",
15
- "sac-sdk": "0.3.5",
16
- "passkey-kit-sdk": "0.6.5"
15
+ "passkey-kit-sdk": "0.6.5",
16
+ "sac-sdk": "0.3.5"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@simplewebauthn/types": "^12.0.0",
package/src/kit.ts CHANGED
@@ -397,13 +397,11 @@ export class PasskeyKit extends PasskeyBase {
397
397
  }
398
398
  ) {
399
399
  if (!(txn instanceof AssembledTransaction)) {
400
- txn = typeof txn === 'string' ? txn : txn.toXDR()
401
-
402
400
  try {
403
- txn = AssembledTransaction.fromXDR(this.wallet!.options, txn, this.wallet!.spec)
401
+ txn = AssembledTransaction.fromXDR(this.wallet!.options, typeof txn === 'string' ? txn : txn.toXDR(), this.wallet!.spec)
404
402
  } catch {
405
403
  if (!(txn instanceof AssembledTransaction)) {
406
- const built = TransactionBuilder.fromXDR(txn, this.networkPassphrase);
404
+ const built = TransactionBuilder.fromXDR(typeof txn === 'string' ? txn : txn.toXDR(), this.networkPassphrase);
407
405
  const operation = built.operations[0] as Operation.InvokeHostFunction;
408
406
 
409
407
  txn = await AssembledTransaction.buildWithOp<T>(