Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discuss how to manage "frozen tokens". #321

Open
johnnymatthews opened this issue Dec 4, 2024 · 4 comments
Open

Discuss how to manage "frozen tokens". #321

johnnymatthews opened this issue Dec 4, 2024 · 4 comments
Milestone

Comments

@johnnymatthews
Copy link
Contributor

I came across an Error: {"token":"Frozen"} error when attempting to transfer funds from one account to another. Here's what I ran (comments added for clarity):

# List accounts.
❯ entropy account list
[{"name":"Andre","address":"5D77qPQj7S346ocxgHX7XmYUqtQft4ghXBYBuv8HuznDgDm7","verifyingKeys":["0x0369ec77d1f94319f27322ce10e2f60ab4634bbfbad0c168751cbef7cfe7f4c663"]},{"name":"Yoel","address":"5EJTUTyZnffSdVc7dCVTKKkNmpXUW5MocmtspZXUk7X1CF7M","verifyingKeys":[]}]%                   



# Check balance of Andre.
❯ entropy balance "Andre"
15,449,682,418 BITS%



# Transfer funds from Andre to Yoel (using Yoel's public address seen above).
❯ entropy transfer --account "Andre" 5EJTUTyZnffSdVc7dCVTKKkNmpXUW5MocmtspZXUk7X1CF7M 1

node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
    ^

Error: {"token":"Frozen"}
    at formatDispatchError (file:///home/johnny/Code/entropy/cli/dist/cli.js:3526:10)
    at file:///home/johnny/Code/entropy/cli/dist/cli.js:11320:25
    at file:///home/johnny/Code/entropy/cli/node_modules/@polkadot/api/promise/decorateMethod.js:56:28
    at file:///home/johnny/Code/entropy/cli/node_modules/@polkadot/util/nextTick.js:13:13

Node.js v23.2.0

I get a similar error when using Node v20.18.1:

node:internal/process/promises:391
    triggerUncaughtException(err, true /* fromPromise */);
    ^

Error: {"token":"Frozen"}
    at formatDispatchError (file:///home/johnny/.local/share/pnpm/global/5/.pnpm/@[email protected]/node_modules/@entropyxyz/cli/dist/cli.js:3525:10)
    at file:///home/johnny/.local/share/pnpm/global/5/.pnpm/@[email protected]/node_modules/@entropyxyz/cli/dist/cli.js:11271:25
    at file:///home/johnny/.local/share/pnpm/global/5/.pnpm/@[email protected]/node_modules/@polkadot/api/promise/decorateMethod.js:56:28
    at file:///home/johnny/.local/share/pnpm/global/5/.pnpm/@[email protected]/node_modules/@polkadot/util/nextTick.js:13:13

Node.js v20.18.1
johnnymatthews added a commit to entropyxyz/entropy-docs that referenced this issue Dec 4, 2024
There's a blocked issue here while we wait for JS to address
entropyxyz/cli#321.
@mixmix mixmix added this to the Usability milestone Dec 9, 2024
@mixmix
Copy link
Contributor

mixmix commented Dec 9, 2024

Frankie says "there is some balance which is frozen, i.e. you cannot take your balance below 1"
This needs some work / design to describe to users how balance works.

Might need to check if balance shows free balance.

#needsmorework

@johnnymatthews johnnymatthews changed the title Receiving a Token frozen error when transferring funds programmatically. Discuss how to manage "frozen tokens". Dec 10, 2024
@johnnymatthews
Copy link
Contributor Author

johnnymatthews commented Dec 10, 2024

Cool beans. So this is expected behavour but the CLI just isn't giving out a nice error/warning.

This needs some work / design to describe to users how balance works. -- @mixmix

Ok nice. Yeah something like this would be nice:

# Ask for balance.
entropy balance "Andre"
15,449,682,418 BITS%


# Ask for balance minus the locked funds.
entropy balance "Andre" --without-locked-funds
5,449,682,418 BITS%

There's likely a more succinct way of saying without locked funds.

@rh0delta
Copy link
Contributor

Cool beans. So this is expected behavour but the CLI just isn't giving out a nice error/warning.

This needs some work / design to describe to users how balance works. -- @mixmix

Ok nice. Yeah something like this would be nice:

# Ask for balance.

entropy balance "Andre"

15,449,682,418 BITS%





# Ask for balance minus the locked funds.

entropy balance "Andre" --without-locked-funds

5,449,682,418 BITS%

There's likely a more succinct way of saying without locked funds.

There might be some confusion here, we don't display the summation of all the balances attached to a users account. The value displayed is only the free balance available, meaning the balance that can be used freely without any restrictions.

@johnnymatthews
Copy link
Contributor Author

Oh I see! But that means I don't understand why I was getting the error in my original post. If 15,449,682,418 is my available balance, why get a {"token":"Frozen"} error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants