When I tried to send funds from END_USER_WALLET to EXTERNAL_WALLET_ADDRESS (ONE_TIME_ADDRESS), and from END_USER_WALLET to EXTERNAL_WALLET_ADDRESS (ONE_TIME_ADDRESS), my transactions are always in the pending state based on the events received via webhook.
However, I am getting these errors at the frontend:
signTransaction has already started signTransaction [Error: signTransaction has already started] {"code": "Error", "message": "signTransaction has already started", "nativeStackAndroid": [], "userInfo": null}
This is my code:
signTransaction: async (txId: string) => {
// if (!apiService) {
// throw new Error("apiService is not initialized");
// }
const { signTransaction } = get();
if (!fireblocksNCW) {
throw new Error("fireblocksNCW is not initialized");
}
try {
console.log("Here Start Signing");
const res = await fireblocksNCW.signTransaction(txId);
console.log({ res }, "AFTER SIGNING RESPONSE");
return res;
} catch (err: unknown) {
console.error(err.message, "signTransaction", err, { ...err });
showSnackbar({
data: err.message,
mode: "ERROR",
});
// if (err?.txId === txId) {
// throw err;
// } else {
// await fireblocksNCW.stopInProgressSignTransaction();
// signTransaction(txId); // recall signTransaction
// }
}
},
The control is getting to the code statement const res = await fireblocksNCW.signTransaction(txId);
and jumped to catch block from there.