Skip to content

Commit

Permalink
♻️ Fix import usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuGowda committed Jan 5, 2023
1 parent 8126fe3 commit 25e6fc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/modules/transaction/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ export const transactionBroadcasted = (transaction, moduleCommandSchemas) =>
let broadcastResult;
const dryRunResult = await dryRun({ transaction, serviceUrl, network });

// If the results is 1 then its successful
if (dryRunResult.data?.result === 1) {
broadcastResult = await broadcast(
{ transaction, serviceUrl, moduleCommandSchemas },
Expand All @@ -166,10 +165,9 @@ export const transactionBroadcasted = (transaction, moduleCommandSchemas) =>
return true;
}
// @todo we need to push pending transaction to the query cache

// https://github.com/LiskHQ/lisk-desktop/issues/4698 should handle this logic
}

// If the results is -1 then the transaction is failed during transaction verification
if (dryRunResult.data?.result === -1) {
dispatch({
type: actionTypes.broadcastedTransactionError,
Expand All @@ -182,6 +180,7 @@ export const transactionBroadcasted = (transaction, moduleCommandSchemas) =>

if (dryRunResult.data?.result === 0) {
// @TODO: Prepare error message by parsing the events based on each transaction type
// https://github.com/LiskHQ/lisk-desktop/issues/4698 should resolve all the dry run related logic along with feedback
const temporaryError = dryRunResult.data?.events.map(e => e.name).join(', ')
dispatch({
type: actionTypes.broadcastedTransactionError,
Expand Down
3 changes: 1 addition & 2 deletions src/modules/transaction/utils/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
*
*/

import { codec as liskCodec, cryptography } from '@liskhq/lisk-client';
import { codec, cryptography } from '@liskhq/lisk-client';
import { trimBigintString } from './helpers';
import { joinModuleAndCommand } from './moduleCommand';

const { codec } = liskCodec;
// TODO: Use from service endpoint/elements
export const baseTransactionSchema = {
$id: '/lisk/baseTransaction',
Expand Down

0 comments on commit 25e6fc2

Please sign in to comment.