Skip to content

Commit

Permalink
Use txId returned by CGW instead of tx hash for up to date results
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Jäckel committed Aug 31, 2023
1 parent 914e159 commit 8d2866e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ class SendAssetReviewViewModel
SendAssetReviewState(
ViewAction.NavigateTo(
SendAssetReviewFragmentDirections.actionSendAssetReviewFragmentToSendAssetSuccessFragment(
activeSafe.chain,
safeTxHash,
amountString,
selectedAsset.symbol
chain = activeSafe.chain,
txId = safeTxHash, // to get non cached updates later we need the txId not the hash
amount = amountString,
token = selectedAsset.symbol
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class TransactionDetailsFragment : BaseViewBindingFragment<FragmentTransactionDe
Navigation.findNavController(root).navigateUp()
}
refresh.setOnRefreshListener {
viewModel.loadDetails(txId)
viewModel.loadDetails(viewModel.txDetails?.txId ?: txId)
}
}

Expand Down Expand Up @@ -130,7 +130,7 @@ class TransactionDetailsFragment : BaseViewBindingFragment<FragmentTransactionDe
viewModel.resumeFlow(ownerSelected()!!, ownerSigned())
resetOwnerData()
} else {
viewModel.loadDetails(txId)
viewModel.loadDetails(viewModel.txDetails?.txId ?: txId)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import java.util.*

@JsonClass(generateAdapter = true)
data class TransactionDetails(
@Json(name = "txId")
val txId: String? = null,
@Json(name = "txHash")
val txHash: String? = null,
@Json(name = "txStatus")
Expand Down

0 comments on commit 8d2866e

Please sign in to comment.