Open rustam-RI opened 5 years ago
Allowance is approve the number of tokens that a contract on interface. Without allowances you cannot deposit the tokens to the contract.
Sorry @ksridharbabuus, I am not sure that I understood it properly, I still wonder why do we actually need to approve this number of tokens through allowance option? Why can't we just deposit them like we do on the beta platform / which benefits does allowance give? It seems rational to expect consistent / similar behavior relating to tokens depositing both on beta and RFAI platforms.
@rustam-snet Unfortunately this is the only way we can deposit to a contract and we are doing the same in Beta site as well.
This is how the security is managed in the Ethereum Blockchain. Thanks!
@ksridharbabuus I am sorry but I don't see the "Allowance" option on the Beta website. Can you please elaborate on that? As you have said that it's implemented in the same way for the Beta.
Should be available as I have implemented backend smart contract for that dapp as well. In the rfai dapp we called as approve Token for simplicity where it internally updates allowances. Let me know if you have any further questions. Thanks for all your assistance.
On Fri 19 Apr, 2019, 19:47 Rustam | SingularityNET.io, < notifications@github.com> wrote:
@ksridharbabuus https://github.com/ksridharbabuus I am sorry but I don't see the "Allowance" option on the Beta website. Can you please elaborate on that? As you have said that it's implemented in the same way for the Beta.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/singnet/snet-rfai-dapp/issues/30#issuecomment-484909084, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYVNXHV4CQW5HVVLVV52PDPRHH6HANCNFSM4HD5KEDA .
@ksridharbabuus it is true that the "allowance" field is visible on the Beta, but you can not interact with it the same way that happens on RFAI. Instead, it seems that part is automatically taken care of while in Beta, but on the RFAI is just an extra step that the user needs to go through. Please check the images below. Is it possible to consider this as an enhancement and copy the same approach used on the Beta?
Beta:
RFAI:
@ksridharbabuus on the marketplace dapp we got a lot of feedback from users that the Allowance was confusing. So we integrated that into the deposit step. Can we do the same here as well? So when you deposit we first do an allowance and the deposit. I know that this is not gas efficient but is more easily understood by the end user.
@ksridharbabuus what is the purpose of showing the allowance or "authorized tokens" to the user? For the user it seems that the amount deposited goes automatically from "authorized tokens" to "escrow balance", so maybe we should hide that on the front-end and only keep "token balance" + "escrow balance" on the account pages?
Also when I tried to "Approve" 1 AGI token through this option by pressing "Approve" on "Allowance" tab and confirming transaction I saw 1 AGI in Authorized Tokens but still the same amount in Token Balance as I had before this operation.
UPDATE: Oh, now I tried to deposit 5 AGI and I got the message "Oops! You are trying to transfer more than you have approved.". Why do we need to go through this "Allowance" option and approve tokens before depositing? Isn't that excessive?