@sodax/sdk 0.0.1-rc.41 → 0.0.1-rc.42
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 +12 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +12 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8980,12 +8980,8 @@ var StellarSpokeProvider = class {
|
|
|
8980
8980
|
}
|
|
8981
8981
|
handleSendTransactionError(response) {
|
|
8982
8982
|
if (response.status === "ERROR") {
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
name: response?.errorResult?.result()?.switch()?.name ?? "unknown",
|
|
8986
|
-
value: response?.errorResult?.result()?.switch()?.value ?? "unknown"
|
|
8987
|
-
})}, diagnosticEvents: ${JSON.stringify(response?.diagnosticEvents ?? "{}")}`
|
|
8988
|
-
);
|
|
8983
|
+
console.error(JSON.stringify(response, null, 2));
|
|
8984
|
+
throw new Error(JSON.stringify(response, null, 2));
|
|
8989
8985
|
}
|
|
8990
8986
|
return response;
|
|
8991
8987
|
}
|
|
@@ -9101,13 +9097,14 @@ var StellarSpokeProvider = class {
|
|
|
9101
9097
|
const accountResponse = await this.server.loadAccount(walletAddress);
|
|
9102
9098
|
const stellarAccount = new CustomStellarAccount(accountResponse);
|
|
9103
9099
|
const sendMessageCall = this.buildSendMessageCall(walletAddress, dst_chain_id, dst_address, payload);
|
|
9104
|
-
const [
|
|
9100
|
+
const [rawPriorityTx, simulation] = await this.buildPriorityStellarTransaction(
|
|
9105
9101
|
stellarAccount,
|
|
9106
9102
|
network,
|
|
9107
9103
|
sendMessageCall
|
|
9108
9104
|
);
|
|
9105
|
+
const assembledPriorityTx = SorobanRpc.assembleTransaction(rawPriorityTx, simulation).build();
|
|
9109
9106
|
if (raw) {
|
|
9110
|
-
const transactionXdr =
|
|
9107
|
+
const transactionXdr = rawPriorityTx.toXDR();
|
|
9111
9108
|
return {
|
|
9112
9109
|
from: walletAddress,
|
|
9113
9110
|
to: this.chainConfig.addresses.assetManager,
|
|
@@ -9115,7 +9112,13 @@ var StellarSpokeProvider = class {
|
|
|
9115
9112
|
data: transactionXdr
|
|
9116
9113
|
};
|
|
9117
9114
|
}
|
|
9118
|
-
const hash = await this.submitOrRestoreAndRetry(
|
|
9115
|
+
const hash = await this.submitOrRestoreAndRetry(
|
|
9116
|
+
stellarAccount,
|
|
9117
|
+
network,
|
|
9118
|
+
assembledPriorityTx,
|
|
9119
|
+
sendMessageCall,
|
|
9120
|
+
simulation
|
|
9121
|
+
);
|
|
9119
9122
|
return `${hash}`;
|
|
9120
9123
|
} catch (error) {
|
|
9121
9124
|
console.error("Error during sendMessage:", error);
|