diff --git a/packages/chain-adapters/src/utxo/UtxoBaseAdapter.ts b/packages/chain-adapters/src/utxo/UtxoBaseAdapter.ts index 9b1f7625520..72e31d9f2fd 100644 --- a/packages/chain-adapters/src/utxo/UtxoBaseAdapter.ts +++ b/packages/chain-adapters/src/utxo/UtxoBaseAdapter.ts @@ -401,6 +401,20 @@ export abstract class UtxoBaseAdapter implements IChainAd const { fee: averageFee } = utxoSelect({ ...utxoSelectInput, satoshiPerByte: averagePerByte }) const { fee: slowFee } = utxoSelect({ ...utxoSelectInput, satoshiPerByte: slowPerByte }) + // Special, temporary case for DOGE to provide a workable fee value when the node is struggling + const isDoge = pubkey.startsWith('dgub') + const allFeesDefined = + fastFee !== undefined && averageFee !== undefined && slowFee !== undefined + if (isDoge && !allFeesDefined) { + const satoshiPerByte = '20000' + const fee = utxoSelect({ ...utxoSelectInput, satoshiPerByte }).fee + return { + fast: { txFee: String(fee), chainSpecific: { satoshiPerByte } }, + average: { txFee: String(fee), chainSpecific: { satoshiPerByte } }, + slow: { txFee: String(fee), chainSpecific: { satoshiPerByte } }, + } as FeeDataEstimate + } + return { fast: { txFee: String(fastFee), chainSpecific: { satoshiPerByte: fastPerByte } }, average: { txFee: String(averageFee), chainSpecific: { satoshiPerByte: averagePerByte } }, diff --git a/src/lib/swapper/swappers/ThorchainSwapper/utils/longTailHelpers.ts b/src/lib/swapper/swappers/ThorchainSwapper/utils/longTailHelpers.ts index d9b4b8071e7..9ea00979ce2 100644 --- a/src/lib/swapper/swappers/ThorchainSwapper/utils/longTailHelpers.ts +++ b/src/lib/swapper/swappers/ThorchainSwapper/utils/longTailHelpers.ts @@ -41,7 +41,7 @@ export function getTradeType( switch (true) { case !!sellAssetPool && !!buyAssetPool: case !!buyAssetPool && !sellAssetPool && sellPoolId === 'THOR.RUNE': - case !!sellAssetPool && !buyAssetPool && buyPoolId !== 'THOR.RUNE': + case !!sellAssetPool && !buyAssetPool && buyPoolId === 'THOR.RUNE': return TradeType.L1ToL1 case !sellAssetPool && !buyAssetPool: return TradeType.LongTailToLongTail