Skip to content

Commit

Permalink
Able to view unconfirmed tx in tx details page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-Slime committed Sep 30, 2022
1 parent d94f728 commit 4ff9a69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/models/util/transactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,10 @@ export class TransactionUtils {
let txn:any = {};
let txnStatus:TransactionStatus;
txnStatus = await AppState.chainAPI.transactionAPI.getTransactionStatus(hash);
if(txnStatus.group == 'partial'){
if(txnStatus.group == 'unconfirmed'){
txn = await AppState.chainAPI.transactionAPI.getUnconfirmedTransaction(hash);
}
else if(txnStatus.group == 'partial'){
txn = await AppState.chainAPI.transactionAPI.getPartialTransaction(hash);
}else if(txnStatus.group == 'failed'){
return {txn: {}, txnStatus, isFound: true};
Expand Down Expand Up @@ -593,7 +596,7 @@ export class TransactionUtils {
deadline = txn.deadline.adjustedValue.compact();
}

if(txnStatus.group == 'partial'){
if(txnStatus.group == 'partial' || txnStatus.group == 'unconfirmed'){
// txn.deadline = deadline;
txn.timestamp = Helper.formatDeadline(deadline);
txn.fee = '-';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/transaction/components/TxnDetailComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</div>
</div>
</div>
<div v-if="txnDetail.group=='partial'">
<div v-if="txnDetail.group=='partial' || txnDetail.group=='unconfirmed'">
<div>Deadline</div>
<div>{{ txnDetail.timestamp }}</div>
</div>
Expand Down

0 comments on commit 4ff9a69

Please sign in to comment.