Skip to content

Commit

Permalink
refactor: updating the transfer to allow death as new on chain logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Dudleyneedham committed Sep 5, 2024
1 parent 1c9a374 commit 6612b51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utilities/transfers/transfers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function signTransfer(input: Input): Promise<string> {
const { recipient, amount, keypair, tip } = input;

const api = ConfigService.get('api');
const tx = api.tx.balances.transfer(recipient, amount);
const tx = api.tx.balances.transferAllowDeath(recipient, amount);

const signedTx = await tx.signAsync(keypair, { tip });
const hash = signedTx.hash.toHex();
Expand Down
2 changes: 1 addition & 1 deletion src/views/SendToken/getFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const fallbackAddressForFee =
export async function getFee(input: FeeInput): Promise<BN> {
const api = ConfigService.get('api');

const tx = api.tx.balances.transfer(
const tx = api.tx.balances.transferAllowDeath(
input.recipient || fallbackAddressForFee,
input.amount,
);
Expand Down

0 comments on commit 6612b51

Please sign in to comment.