Skip to content

Commit

Permalink
evm: fixes canonical chain token redeem
Browse files Browse the repository at this point in the history
  • Loading branch information
scnale committed Oct 5, 2024
1 parent 2b5ed45 commit 454a6b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion evm/src/assets/TbrUser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,12 @@ abstract contract TbrUser is TbrBase {
// Perform redeem in TB
tokenBridge.completeTransferWithPayload(vaa);

IERC20Metadata token = IERC20Metadata(tokenBridge.wrappedAsset(tokenOriginChain, tokenOriginAddress));
IERC20Metadata token
if (whChainId != tokenOriginChain) {
token = IERC20Metadata(tokenBridge.wrappedAsset(tokenOriginChain, tokenOriginAddress));
} else {
token = fromUniversalAddress(tokenOriginAddress);
}

// If an unwrap is desired, unwrap and call recipient with full amount
uint totalGasTokenAmount = gasDropoff;
Expand Down

0 comments on commit 454a6b5

Please sign in to comment.