passkey-kit 0.10.11 → 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.
- package/package.json +1 -1
- package/src/kit.ts +10 -10
package/package.json
CHANGED
package/src/kit.ts
CHANGED
|
@@ -397,18 +397,18 @@ export class PasskeyKit extends PasskeyBase {
|
|
|
397
397
|
}
|
|
398
398
|
) {
|
|
399
399
|
if (!(txn instanceof AssembledTransaction)) {
|
|
400
|
-
let tx = typeof txn === 'string' ? txn : txn.toXDR()
|
|
401
|
-
|
|
402
400
|
try {
|
|
403
|
-
txn = AssembledTransaction.fromXDR(this.wallet!.options,
|
|
401
|
+
txn = AssembledTransaction.fromXDR(this.wallet!.options, typeof txn === 'string' ? txn : txn.toXDR(), this.wallet!.spec)
|
|
404
402
|
} catch {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
403
|
+
if (!(txn instanceof AssembledTransaction)) {
|
|
404
|
+
const built = TransactionBuilder.fromXDR(typeof txn === 'string' ? txn : txn.toXDR(), this.networkPassphrase);
|
|
405
|
+
const operation = built.operations[0] as Operation.InvokeHostFunction;
|
|
406
|
+
|
|
407
|
+
txn = await AssembledTransaction.buildWithOp<T>(
|
|
408
|
+
Operation.invokeHostFunction({ func: operation.func }),
|
|
409
|
+
this.wallet!.options as AssembledTransactionOptions<T>
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
|