Skip to content

Commit

Permalink
fix: transaction loader crash
Browse files Browse the repository at this point in the history
  • Loading branch information
N3TC4T committed Mar 22, 2024
1 parent a5bafd3 commit c562582
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/screens/Modal/TransactionLoader/TransactionLoaderModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,22 @@ class TransactionLoaderModal extends Component<Props, State> {
return;
}

// cleanup
// extract meta from response
const { meta, ...tx } = resp;

// remove some unnecessary fields
delete resp.meta;
// eslint-disable-next-line no-underscore-dangle
delete resp.__replyMs;
// eslint-disable-next-line no-underscore-dangle
delete resp.__command;
delete resp.inLedger;

// build transaction instance
const transactionInstance = TransactionFactory.fromJson(resp);
const transactionInstance = TransactionFactory.fromLedger({
ledger_index: resp.ledger_index,
validated: resp.validated,
tx,
meta,
});

// switch to the right account if necessary
const coreSettings = CoreRepository.getSettings();
Expand Down

0 comments on commit c562582

Please sign in to comment.