difftreelog
test balances.transfer => balances.transferKeepAlive
in: master
4 files changed
js-packages/playgrounds/unique.dev.tsdiffbeforeafterboth696 const recipient = this.helper.util.fromSeed(mnemonicGenerate(), ss58Format);696 const recipient = this.helper.util.fromSeed(mnemonicGenerate(), ss58Format);697 accounts.push(recipient);697 accounts.push(recipient);698 if(balance !== 0n) {698 if(balance !== 0n) {699 const tx = this.helper.constructApiCall('api.tx.balances.transfer', [{Id: recipient.address}, balance * tokenNominal]);699 const tx = this.helper.constructApiCall('api.tx.balances.transferKeepAlive', [{Id: recipient.address}, balance * tokenNominal]);700 transactions.push(this.helper.signTransaction(donor, tx, {nonce}, 'account generation'));700 transactions.push(this.helper.signTransaction(donor, tx, {nonce}, 'account generation'));701 nonce++;701 nonce++;702 }702 }749 const recipient = this.helper.util.fromSeed(mnemonicGenerate(), ss58Format);749 const recipient = this.helper.util.fromSeed(mnemonicGenerate(), ss58Format);750 accounts.push(recipient);750 accounts.push(recipient);751 if(withBalance !== 0n) {751 if(withBalance !== 0n) {752 const tx = this.helper.constructApiCall('api.tx.balances.transfer', [{Id: recipient.address}, withBalance * tokenNominal]);752 const tx = this.helper.constructApiCall('api.tx.balances.transferKeepAlive', [{Id: recipient.address}, withBalance * tokenNominal]);753 transactions.push(this.helper.signTransaction(donor, tx, {nonce}, 'account generation'));753 transactions.push(this.helper.signTransaction(donor, tx, {nonce}, 'account generation'));754 nonce++;754 nonce++;755 }755 }js-packages/playgrounds/unique.tsdiffbeforeafterboth--- a/js-packages/playgrounds/unique.ts
+++ b/js-packages/playgrounds/unique.ts
@@ -2391,7 +2391,7 @@
* @returns ```true``` if extrinsic success, otherwise ```false```
*/
async transferToSubstrate(signer: TSigner, address: TSubstrateAccount, amount: bigint | string): Promise<boolean> {
- const result = await this.helper.executeExtrinsic(signer, 'api.tx.balances.transfer', [address, amount], true/*, `Unable to transfer balance from ${this.helper.getSignerAddress(signer)} to ${address}`*/);
+ const result = await this.helper.executeExtrinsic(signer, 'api.tx.balances.transferKeepAlive', [address, amount], true/*, `Unable to transfer balance from ${this.helper.getSignerAddress(signer)} to ${address}`*/);
let transfer = {from: null, to: null, amount: 0n} as any;
result.result.events.forEach(({event: {data, method, section}}: any) => {
@@ -2458,7 +2458,7 @@
* @returns ```true``` if extrinsic success, otherwise ```false```
*/
async transferToEthereum(signer: TSigner, address: TEthereumAccount, amount: bigint | string): Promise<boolean> {
- const result = await this.helper.executeExtrinsic(signer, 'api.tx.balances.transfer', [address, amount], true);
+ const result = await this.helper.executeExtrinsic(signer, 'api.tx.balances.transferKeepAlive', [address, amount], true);
let transfer = {from: null, to: null, amount: 0n} as any;
result.result.events.forEach(({event: {data, method, section}}: any) => {
js-packages/tests/scheduler.seqtest.tsdiffbeforeafterboth--- a/js-packages/tests/scheduler.seqtest.ts
+++ b/js-packages/tests/scheduler.seqtest.ts
@@ -507,7 +507,7 @@
for(let offset = 0; offset < numFilledBlocks; offset ++) {
for(let i = 0; i < maxScheduledPerBlock; i++) {
- const scheduledTx = helper.constructApiCall('api.tx.balances.transfer', [bob.address, 1n]);
+ const scheduledTx = helper.constructApiCall('api.tx.balances.transferKeepAlive', [bob.address, 1n]);
const when = firstExecutionBlockNumber + period + offset;
const mandatoryArgs = [when, null, null, scheduledTx];
@@ -710,7 +710,7 @@
// await addToAllowListExpectSuccess(alice, collectionId, zeroBalance.address);
// // Grace zeroBalance with money, enough to cover future transactions
- // const balanceTx = api.tx.balances.transfer(zeroBalance.address, 1n * UNIQUE);
+ // const balanceTx = api.tx.balances.transferKeepAlive(zeroBalance.address, 1n * UNIQUE);
// await submitTransactionAsync(alice, balanceTx);
// // Mint a fresh NFT
@@ -722,7 +722,7 @@
// await scheduleTransferExpectSuccess(api, collectionId, tokenId, zeroBalance, alice, 1, waitForBlocks, scheduledId);
// // Get rid of the account's funds before the scheduled transaction takes place
- // const balanceTx2 = api.tx.balances.transfer(alice.address, UNIQUE * 68n / 100n);
+ // const balanceTx2 = api.tx.balances.transferKeepAlive(alice.address, UNIQUE * 68n / 100n);
// const events = await submitTransactionAsync(zeroBalance, balanceTx2);
// expect(getGenericResult(events).success).to.be.true;
// /*const emptyBalanceTx = api.tx.balances.setBalance(zeroBalance.address, 0, 0); // do not null reserved?
@@ -742,7 +742,7 @@
// await usingApi(async (api, privateKey) => {
// const zeroBalance = await findUnusedAddress(api, privateKey);
- // const balanceTx = api.tx.balances.transfer(zeroBalance.address, 1n * UNIQUE);
+ // const balanceTx = api.tx.balances.transferKeepAlive(zeroBalance.address, 1n * UNIQUE);
// await submitTransactionAsync(alice, balanceTx);
// await setCollectionSponsorExpectSuccess(collectionId, zeroBalance.address);
js-packages/tests/util/globalSetup.tsdiffbeforeafterboth--- a/js-packages/tests/util/globalSetup.ts
+++ b/js-packages/tests/util/globalSetup.ts
@@ -81,7 +81,7 @@
if(aliceBalance < MINIMUM_DONOR_FUND * oneToken) {
tx.push(helper.executeExtrinsic(
alice,
- 'api.tx.balances.transfer',
+ 'api.tx.balances.transferKeepAlive',
[account.address, DONOR_FUNDING * oneToken],
true,
{nonce: nonce + balanceGrantedCounter++},