Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,14 @@ export class DistributeFeesHandler extends BasePhaseHandler {
reject(this.handleDispatchError(api, dispatchError, systemExtrinsicFailedEvent, "distributeFees"));
}

if (status.isBroadcast || status.isInBlock) {
if (status.isBroadcast) {
logger.info(`Transaction broadcasted: ${status.asBroadcast.toString()}`);
resolve(txHash.toHex());
}
if (status.isInBlock) {
logger.info(`Transaction in block: ${status.asInBlock.toString()}`);
resolve(txHash.toHex());
}
})
.catch((error: unknown) => {
logger.error("Error submitting transaction to distribute fees:", error);
Expand Down
15 changes: 12 additions & 3 deletions apps/frontend/src/machines/actors/sign.actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ERC20_EURE_POLYGON_V2,
getAddressForFormat,
getOnChainTokenDetails,
isEvmTransactionData,
Networks,
PermitSignature,
RampDirection
Expand Down Expand Up @@ -48,15 +49,23 @@ export const signTransactionsActor = async ({
}

const userTxs = rampState?.ramp?.unsignedTxs?.filter(tx => {
// If a monerium wallet address is provided in the execution input, we use that as the signer address.
const signerAddress = executionInput?.moneriumWalletAddress || connectedWalletAddress;
// For substrate networks (Pendulum/AssetHub), always use connectedWalletAddress.
// moneriumWalletAddress is only for Monerium flows with EVM transactions.
const isSubstrateTransaction = !isEvmTransactionData(tx.txData);
const signerAddress = isSubstrateTransaction
? connectedWalletAddress
: executionInput?.moneriumWalletAddress || connectedWalletAddress;

if (!signerAddress) {
return false;
}

return chainId < 0 && (tx.network === Networks.Pendulum || tx.network === Networks.AssetHub)
const isSubstrateNetwork = chainId < 0 && isSubstrateTransaction;
const match = isSubstrateNetwork
? getAddressForFormat(tx.signer, 0) === getAddressForFormat(signerAddress, 0)
: tx.signer.toLowerCase() === signerAddress.toLowerCase();

return match;
});

// Add userTx for monerium onramp. Signature is required, which is created in this process.
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"title": "Connect wallet"
},
"polkadotWalletSelectorDialogLoading": {
"description": "Please approve {selectedWallet} and approve the transaction.",
"description": "Please approve {{selectedWallet}} and approve the transaction.",
"title": "Connecting wallet"
},
"selectionModal": {
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"title": "Conectar wallet"
},
"polkadotWalletSelectorDialogLoading": {
"description": "Por favor, aprove {selectedWallet} e aprove a transação.",
"description": "Por favor, aprove {{selectedWallet}} e aprove a transação.",
"title": "Conectando wallet"
},
"selectionModal": {
Expand Down