Skip to content

Commit

Permalink
Fix potential crash as no address from token object
Browse files Browse the repository at this point in the history
  • Loading branch information
manhlx3006 committed Dec 12, 2019
1 parent 7669f42 commit f062c5a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ extension KNAppCoordinator {
}
if self.session != nil {
self.session.transacionCoordinator?.forceUpdateNewTransactionsWhenPendingTxCompleted()
if trans.isTransfer, let tokenAddr = trans.getTokenObject()?.address.description {
if trans.isTransfer, let tokenAddr = trans.getTokenObject()?.contract {
self.loadBalanceCoordinator?.fetchTokenAddressAfterTx(token1: tokenAddr, token2: tokenAddr)
} else if let objc = trans.localizedOperations.first {
self.loadBalanceCoordinator?.fetchTokenAddressAfterTx(token1: objc.from, token2: objc.to)
Expand Down

0 comments on commit f062c5a

Please sign in to comment.