fix: router preferred chains
This commit is contained in:
parent
194f26f3b4
commit
f3b1448efa
|
@ -112,7 +112,6 @@ type Path struct {
|
||||||
BonderFees *hexutil.Big
|
BonderFees *hexutil.Big
|
||||||
TokenFees *big.Float
|
TokenFees *big.Float
|
||||||
Cost *big.Float
|
Cost *big.Float
|
||||||
Preferred bool
|
|
||||||
EstimatedTime TransactionEstimation
|
EstimatedTime TransactionEstimation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +357,7 @@ func (r *Router) suggestedRoutes(ctx context.Context, sendType SendType, account
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(preferedChainIDs) > 0 && !containsNetworkChainID(network, preferedChainIDs) {
|
if len(preferedChainIDs) > 0 && !containsNetworkChainID(dest, preferedChainIDs) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,8 +390,6 @@ func (r *Router) suggestedRoutes(ctx context.Context, sendType SendType, account
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
preferred := containsNetworkChainID(dest, preferedChainIDs)
|
|
||||||
|
|
||||||
gasCost := new(big.Float)
|
gasCost := new(big.Float)
|
||||||
gasCost.Mul(
|
gasCost.Mul(
|
||||||
new(big.Float).Mul(gweiToEth(maxFees), big.NewFloat((float64(gasLimit)))),
|
new(big.Float).Mul(gweiToEth(maxFees), big.NewFloat((float64(gasLimit)))),
|
||||||
|
@ -419,7 +416,6 @@ func (r *Router) suggestedRoutes(ctx context.Context, sendType SendType, account
|
||||||
GasFees: gasFees,
|
GasFees: gasFees,
|
||||||
BonderFees: (*hexutil.Big)(bonderFees),
|
BonderFees: (*hexutil.Big)(bonderFees),
|
||||||
TokenFees: tokenFeesAsFloat,
|
TokenFees: tokenFeesAsFloat,
|
||||||
Preferred: preferred,
|
|
||||||
Cost: cost,
|
Cost: cost,
|
||||||
EstimatedTime: estimatedTime,
|
EstimatedTime: estimatedTime,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue