@bolt-liquidity-hq/sui-client 0.1.0-beta.24 → 0.1.0-beta.25
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/dist/index.cjs +23 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -28
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -724,37 +724,32 @@ var signAndExecuteTx = async (suiClient, signer, target, args, typeArguments, tr
|
|
|
724
724
|
arguments: txArgs,
|
|
725
725
|
typeArguments
|
|
726
726
|
});
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
return result;
|
|
736
|
-
} else {
|
|
737
|
-
throw new import_core4.TransactionFailedError(result.digest, result.effects?.status.error, { result });
|
|
738
|
-
}
|
|
727
|
+
if ("toSuiAddress" in signer) {
|
|
728
|
+
const result = await suiClient.signAndExecuteTransaction({
|
|
729
|
+
signer,
|
|
730
|
+
transaction: tx,
|
|
731
|
+
options
|
|
732
|
+
});
|
|
733
|
+
if (result.effects?.status.status === "success") {
|
|
734
|
+
return result;
|
|
739
735
|
} else {
|
|
740
|
-
|
|
741
|
-
transaction: tx
|
|
742
|
-
});
|
|
743
|
-
if (!result.digest) {
|
|
744
|
-
throw new import_core4.TransactionFailedError("not found");
|
|
745
|
-
}
|
|
746
|
-
const fullTx = await suiClient.waitForTransaction({
|
|
747
|
-
digest: result.digest,
|
|
748
|
-
options
|
|
749
|
-
});
|
|
750
|
-
return fullTx;
|
|
736
|
+
throw new import_core4.TransactionFailedError(result.digest, result.effects?.status.error, { result });
|
|
751
737
|
}
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
args,
|
|
756
|
-
typeArguments
|
|
738
|
+
} else {
|
|
739
|
+
const result = await signer.signAndExecuteTransaction({
|
|
740
|
+
transaction: tx
|
|
757
741
|
});
|
|
742
|
+
if (!result.digest) {
|
|
743
|
+
throw new import_core4.TransactionFailedError("not found");
|
|
744
|
+
}
|
|
745
|
+
const fullTx = await suiClient.waitForTransaction({
|
|
746
|
+
digest: result.digest,
|
|
747
|
+
options
|
|
748
|
+
});
|
|
749
|
+
if (fullTx.effects?.status.status !== "success") {
|
|
750
|
+
throw new import_core4.TransactionFailedError(result.digest, fullTx.effects?.status.error, { result });
|
|
751
|
+
}
|
|
752
|
+
return fullTx;
|
|
758
753
|
}
|
|
759
754
|
};
|
|
760
755
|
var estimateTxGasPrice = async (suiClient, senderAddress, target, args, typeArguments, transaction, gasAdjustment = import_core4.DEFAULT_GAS_ADJUSTMENT) => {
|