Skip to content

Commit

Permalink
happy now format :D
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lebee authored and AdaJane committed Jun 26, 2023
1 parent 9b07ac8 commit db34994
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/cc-cli/src/utils/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export async function signSendAndWatch(
unsubAndResolve(result);
}
if (dispatchError) {

let blockHash: string | null = null;
if (status.isInBlock) blockHash = status.asInBlock.toHex();

Expand All @@ -39,14 +38,18 @@ export async function signSendAndWatch(
const error = `${section}.${name}: ${docs.join(" ")}`;
const result = {
status: TxStatus.failed,
info: `Transaction failed with error: "${error}" ${blockHash ? "at block " + blockHash : ""}`,
info: `Transaction failed with error: "${error}" ${
blockHash ? "at block " + blockHash : ""
}`,
};
unsubAndResolve(result);
} else {
// Other, CannotLookup, BadOrigin, no extra info
const result = {
status: TxStatus.failed,
info: `Transaction failed with error: "${dispatchError.toString()}" ${blockHash ? "at block " + blockHash : ""}`,
info: `Transaction failed with error: "${dispatchError.toString()}" ${
blockHash ? "at block " + blockHash : ""
}`,
};
unsubAndResolve(result);
}
Expand Down

0 comments on commit db34994

Please sign in to comment.