mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Broadcasting transaction error is fixed with using a Promise object (#1101)
This commit is contained in:
parent
1e11948c07
commit
0d609f1292
@ -372,8 +372,10 @@ export class StargateClient {
|
||||
|
||||
const broadcasted = await this.forceGetTmClient().broadcastTxSync({ tx });
|
||||
if (broadcasted.code) {
|
||||
throw new Error(
|
||||
`Broadcasting transaction failed with code ${broadcasted.code} (codespace: ${broadcasted.codeSpace}). Log: ${broadcasted.log}`,
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
`Broadcasting transaction failed with code ${broadcasted.code} (codespace: ${broadcasted.codeSpace}). Log: ${broadcasted.log}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
const transactionId = toHex(broadcasted.hash).toUpperCase();
|
||||
|
Loading…
x
Reference in New Issue
Block a user