Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #124 from newtmex/maiar-transaction-cancel-error-m…
Browse files Browse the repository at this point in the history
…essage

Added Maiar transaction cancelled error message
  • Loading branch information
danielailie authored Aug 23, 2021
2 parents 919efa3 + f39a9ab commit 4fe9d64
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions react-delegationdashboard/src/helpers/useDelegation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ export default function useDelegation({
if (e.statusCode in ledgerErrorCodes) {
setTransactionError((ledgerErrorCodes as any)[e.statusCode].message);
}
if (e.message === 'HWApp not initialised, call init() first')
if (e.message === 'HWApp not initialised, call init() first') {
setTransactionError('Your session has expired. Please login again');
if (e.message === 'Failed or Rejected Request')
}
if (e.message === 'Failed or Rejected Request') {
setTransactionError('Failed or Rejected Request. Please try again');
}
if (e.message === 'cancel') {
setTransactionError('Transaction Cancelled');
}

console.error(`${transactionArguments.type}`, e);
});
};
Expand Down

0 comments on commit 4fe9d64

Please sign in to comment.