Skip to content

Commit

Permalink
fix in moonchain address
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Dec 17, 2024
1 parent 5906089 commit ea6528d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/mrl/src/getTransferData/getMoonChainData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ export async function getMoonChainData({

const moonChain = getMoonChain(route.source.chain);
const isDestinationMoonChain = moonChain.isEqual(route.destination.chain);
const isSourceEvmChain = EvmChain.is(route.source.chain);
let address =
isDestinationMoonChain || isSourceEvmChain
? destinationAddress
: sourceAddress;
let address = isDestinationMoonChain ? destinationAddress : sourceAddress;

const fee = await getDestinationFee({
address,
Expand All @@ -44,7 +40,7 @@ export async function getMoonChainData({
) {
const addressToUse = EvmParachain.is(route.source.chain)
? evmToAddress(sourceAddress)
: address;
: sourceAddress;
const { address20 } = getMultilocationDerivedAddresses({
address: addressToUse,
paraId: route.source.chain.parachainId,
Expand Down

0 comments on commit ea6528d

Please sign in to comment.