Skip to content

Commit

Permalink
chore: removed redundant address convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
tuul-wq committed Apr 8, 2024
1 parent ac13d2e commit a41b520
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/renderer/entities/transaction/lib/transactionBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ type BondParams = {
};
function buildBond({ chain, asset, accountId, destination, amount }: BondParams): Transaction {
const controller = toAddress(accountId, { prefix: chain.addressPrefix });
const payeeAddress = toAddress(destination, { prefix: chain.addressPrefix });

return {
chainId: chain.chainId,
Expand All @@ -86,7 +85,7 @@ function buildBond({ chain, asset, accountId, destination, amount }: BondParams)
args: {
value: formatAmount(amount, asset.precision),
controller,
payee: destination ? { Account: payeeAddress } : 'Staked',
payee: destination ? { Account: destination } : 'Staked',
},
};
}
Expand Down

0 comments on commit a41b520

Please sign in to comment.