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
I’m not getting refunded after calling storage_withdraw but I can’t tell where things are going wrong :thinking_face:
When deploying, I call storage_deposit on the file contract. When deleting the app, I delete storage to the point where the available balance is nearly equal to the total:
Then I call storage_withdraw and see that only a fraction of the available balance (0.18665N vs ~3.6N) is refunded. After this call, the deployer account actually loses Near instead of getting the original storage refunded:
Nothing sticks out as problematic in the method source, though it is worth mentioning I added a null check so that passing a null amount refunds the available funds. However, I was seeing the same behavior when specifying the amount when calling.
I think the key is understanding why storage_withdraw refunded 0.18665N; the transaction clearly went through but why is that the amount being refunded when the ~3.6 was being correctly deducted from the balance?
The text was updated successfully, but these errors were encountered:
NearPromise instances must either be returned or have .build() called to execute. For now, we will use .build() since we must return the appropriate data for the StorageManagement NEP
I’m not getting refunded after calling storage_withdraw but I can’t tell where things are going wrong :thinking_face:
When deploying, I call storage_deposit on the file contract. When deleting the app, I delete storage to the point where the available balance is nearly equal to the total:
Then I call storage_withdraw and see that only a fraction of the available balance (0.18665N vs ~3.6N) is refunded. After this call, the deployer account actually loses Near instead of getting the original storage refunded:
Nothing sticks out as problematic in the method source, though it is worth mentioning I added a null check so that passing a null amount refunds the available funds. However, I was seeing the same behavior when specifying the amount when calling.
I think the key is understanding why storage_withdraw refunded 0.18665N; the transaction clearly went through but why is that the amount being refunded when the ~3.6 was being correctly deducted from the balance?
The text was updated successfully, but these errors were encountered: