Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

fix: cannot destructure property 'error' of 'result' as it is undefined #340

Merged
merged 2 commits into from
Feb 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ function broadcastStateTransitionHandlerFactory(rpcClient, handleAbciResponseErr

const tx = Buffer.from(stByteArray).toString('base64');

const { result } = await rpcClient.request('broadcast_tx_sync', { tx });

const { error: jsonRpcError } = result;
const { result, error: jsonRpcError } = await rpcClient.request('broadcast_tx_sync', { tx });

if (jsonRpcError) {
if (jsonRpcError.data === 'tx already exists in cache') {
Expand Down