You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per my understanding, for opting out of a transaction in Algo-builder, we need to send a AssetTransfer transaction with amount 0, receiver as ourselves and closeRemainderTo set to the creator address.
Although the opt out works fine, I am getting warning printed that the is already opted in to the asset
Expected Behavior
No warnings
Current Behavior
Warning printed
<account address> is already opted in to the asset <asset id>
Possible Solution
In the following function, a console.warn() is added in Line 390 if asset holding is defined but does not handle the case when the transaction is for opting out.
You can add another if condition to check if closeRemainderTo field is set to the creator of the Asset which confirms that this transaction is a Opt Out transaction and not opt in.
Describe the bug
As per my understanding, for opting out of a transaction in Algo-builder, we need to send a
AssetTransfer
transaction with amount 0, receiver as ourselves andcloseRemainderTo
set to the creator address.An example on your repo can be found here:
algo-builder/examples/permissioned-token/scripts/user/opt-out.js
Lines 20 to 30 in 326d6d3
Although the opt out works fine, I am getting warning printed that the is already opted in to the asset
Expected Behavior
No warnings
Current Behavior
Warning printed
Possible Solution
In the following function, a
console.warn()
is added in Line 390 if asset holding is defined but does not handle the case when the transaction is for opting out.You can add another if condition to check if
closeRemainderTo
field is set to the creator of the Asset which confirms that this transaction is a Opt Out transaction and not opt in.algo-builder/packages/runtime/src/account.ts
Lines 387 to 402 in 326d6d3
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: