diff --git a/src/views/SwapConfirm.vue b/src/views/SwapConfirm.vue
index 6df1c3579..ba526d81b 100644
--- a/src/views/SwapConfirm.vue
+++ b/src/views/SwapConfirm.vue
@@ -21,7 +21,12 @@
@@ -75,19 +80,27 @@ export default {
return format(add(new Date(), { hours: 6 }), 'h:mm a')
},
totalFees () {
- const fees = {}
-
const assetChain = getChainFromAsset(this.asset)
- const initiationFee = getTxFee(this.asset, TX_TYPES.SWAP_INITIATION, this.fee)
- fees[assetChain] = initiationFee
-
const toAssetChain = getChainFromAsset(this.toAsset)
- const claimFee = getTxFee(this.toAsset, TX_TYPES.SWAP_CLAIM, this.toFee)
- fees[toAssetChain] = toAssetChain in fees ? fees[toAssetChain].plus(claimFee) : claimFee
- if (this.sendTo) {
- const sendFee = getTxFee(this.toAsset, TX_TYPES.SEND, this.toFee)
- fees[toAssetChain] = toAssetChain in fees ? fees[toAssetChain].plus(sendFee) : sendFee
+ const fees = {
+ [assetChain]: null,
+ [toAssetChain]: null
+ }
+
+ if (this.fee) {
+ const initiationFee = getTxFee(this.asset, TX_TYPES.SWAP_INITIATION, this.fee)
+ fees[assetChain] = initiationFee
+ }
+
+ if (this.toFee) {
+ const claimFee = getTxFee(this.toAsset, TX_TYPES.SWAP_CLAIM, this.toFee)
+ fees[toAssetChain] = toAssetChain in fees ? fees[toAssetChain].plus(claimFee) : claimFee
+
+ if (this.sendTo) {
+ const sendFee = getTxFee(this.toAsset, TX_TYPES.SEND, this.toFee)
+ fees[toAssetChain] = toAssetChain in fees ? fees[toAssetChain].plus(sendFee) : sendFee
+ }
}
return fees