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
When a delegator delegates parts of his SP to an account, the maximum available SP for delegation should be presented as the difference of his total SP minus his total delegated SP minus 5.000.
Actual behavior
When pressing the "Delegate" button in busy, the maximum available SP for delegation is incorrect wherein it is expressed in this formula: Max available SP = Total SP of the Delegator - Total delegated SP/Outgoing delegation of the account to be delegated - 5.000. With that formula, there are three possible scenarios that would occur which are as follows:
Max available SP = Total SP of the delegator - 5.000, if the account to be delegated doesn't have an outgoing delegation.
Max available SP > 0, if the outgoing delegation of the account to be delegated is less than the delegator's Total SP.
Max available SP = 0, if the outgoing delegation of the account to be delegated is greater than the delegator's total SP.
How to reproduce
Go to busy.org and make sure that SteemPlus plug-in is switched for use in busy.org.
Go to the profile of the account you want to delegate SP.
Click the Wallet of that account.
Click the Delegate button.
The bug would appear for which the maximum available SP for delegation is incorrect.
Recording Of The Bug
In these three recordings, I am the delegator with a Total SP of 715.014 and my total delegated SP of 450.794 is not considered in the computation.
Max Available SP = Total SP of the delegator - 5.000
Account to be delegated @mightypanda (for example), and doesn't have any outgoing delegation.
In delegate.js, the codes in 137-140, the formula for obtaining the maximum available SP that the user can delegate is shown.
function getMaxSP(){
var myVests = parseFloat(steem.formatter.vestToSteem(myAccountDelegation.vesting_shares.replace(' VESTS',''), globalP.totalVests, globalP.totalSteem) * 100) / 100;
var maxSP = myVests - totalOutgoingDelegation - 5.000;
return (maxSP > 0 ? maxSP.toFixed(3) : 0);
}
With that, the amount for totalOutgoingDelegation is obtained from the account to be delegated instead of the delegator. Perhaps, the issue is found in the codes in line 88,
Expected behavior
When a delegator delegates parts of his SP to an account, the maximum available SP for delegation should be presented as the difference of his total SP minus his total delegated SP minus 5.000.
Actual behavior
When pressing the "Delegate" button in busy, the maximum available SP for delegation is incorrect wherein it is expressed in this formula:
Max available SP = Total SP of the Delegator - Total delegated SP/Outgoing delegation of the account to be delegated - 5.000
. With that formula, there are three possible scenarios that would occur which are as follows:Max available SP = Total SP of the delegator - 5.000
, if the account to be delegated doesn't have an outgoing delegation.Max available SP > 0
, if the outgoing delegation of the account to be delegated is less than the delegator's Total SP.Max available SP = 0
, if the outgoing delegation of the account to be delegated is greater than the delegator's total SP.How to reproduce
Recording Of The Bug
In these three recordings, I am the delegator with a Total SP of 715.014 and my total delegated SP of 450.794 is not considered in the computation.
Account to be delegated @mightypanda (for example), and doesn't have any outgoing delegation.
https://youtu.be/OHOAxnogT2A
Account to be delegated @stoodkev (for example), with a total delegated SP of 604.860
https://youtu.be/Y5N4wiEb6vs
Account to be delegated: @utopian-io (for example), with a total delegated SP = 3276.120
https://youtu.be/Cz44DxC6nCk
Environment
Issue
In delegate.js, the codes in 137-140, the formula for obtaining the maximum available SP that the user can delegate is shown.
With that, the amount for
totalOutgoingDelegation
is obtained from the account to be delegated instead of the delegator. Perhaps, the issue is found in the codes in line 88,if(totalOutgoingDelegation===-1&&(regexWalletBusy.test(window.location.href)||regexWalletSteemit.test(window.location.href))&&retryCountDelegate<20)
The text was updated successfully, but these errors were encountered: