Skip to content

feat: Support send acp/sudt to any address.#2400

Merged
Keith-CY merged 6 commits intonervosnetwork:developfrom
yanguoyu:support-sudt-by-create
Jun 6, 2022
Merged

feat: Support send acp/sudt to any address.#2400
Keith-CY merged 6 commits intonervosnetwork:developfrom
yanguoyu:support-sudt-by-create

Conversation

@yanguoyu
Copy link
Contributor

  1. acp/sudt -> secp256k1 address

    i. Cheque lock cell

acp-sudt-to-cheque.mov
 ii. secp256k1/sudt cell
acp-sudt-to-sepe256k1.mov
  1. acp/sudt -> acp/sudt

    i. Send to exist acp/sudt cell

acp-sudt-to-acp.mov
  ii. create a acp/sudt cell
acp-sudt-to-new-acp.mov
  1. acp/sudt -> unknow address
acp-sudt-to-unknow.mov

@Keith-CY
Copy link
Collaborator

image
Use radio instead of checkbox if only one option is allowed

image
We should not imply user to make a decision, simply disable the button

image
We should not check it by default, simply disable the button

@yanguoyu
Copy link
Contributor Author

image Use radio instead of checkbox if only one option is allowed

image We should not imply user to make a decision, simply disable the button

image We should not check it by default, simply disable the button

Generally, radio buttons can't be canceled and can only be switched. If there is only one option, should we just show tips to tell the user how to send sudt? And no need to show radio button?

@Keith-CY
Copy link
Collaborator

image Use radio instead of checkbox if only one option is allowed
image We should not imply user to make a decision, simply disable the button
image We should not check it by default, simply disable the button

Generally, radio buttons can't be canceled and can only be switched. If there is only one option, should we just show tips to tell the user how to send sudt? And no need to show radio button?

What would it be like to show tips to tell the user how to send sudt

@yanguoyu
Copy link
Contributor Author

image Use radio instead of checkbox if only one option is allowed
image We should not imply user to make a decision, simply disable the button
image We should not check it by default, simply disable the button

Generally, radio buttons can't be canceled and can only be switched. If there is only one option, should we just show tips to tell the user how to send sudt? And no need to show radio button?

What would it be like to show tips to tell the user how to send sudt

Like this:
image
Delete checkbox, similar like send cheque before, only show tips.

@Keith-CY
Copy link
Collaborator

Keith-CY commented May 27, 2022

image Use radio instead of checkbox if only one option is allowed
image We should not imply user to make a decision, simply disable the button
image We should not check it by default, simply disable the button

Generally, radio buttons can't be canceled and can only be switched. If there is only one option, should we just show tips to tell the user how to send sudt? And no need to show radio button?

What would it be like to show tips to tell the user how to send sudt

Like this: image Delete checkbox, similar like send cheque before, only show tips.

Ah.. I think there may be a misunderstanding

I mean the first case, there're to options, but only one is allowed to pick, we should use radio, because radio means you have to pick one but only one.

The other cases, only one option to select or unselect, can be a checkbox, because checkbox means you have to accept it to the next step.

@yanguoyu
Copy link
Contributor Author

image Use radio instead of checkbox if only one option is allowed
image We should not imply user to make a decision, simply disable the button
image We should not check it by default, simply disable the button

Generally, radio buttons can't be canceled and can only be switched. If there is only one option, should we just show tips to tell the user how to send sudt? And no need to show radio button?

What would it be like to show tips to tell the user how to send sudt

Like this: image Delete checkbox, similar like send cheque before, only show tips.

Ah.. I think there may be a misunderstanding

I mean the first case, there're to options, but only one is allowed to pick, we should use radio, because radio means you have to pick one but only one.

The other cases, only one option to select or unselect, can be a checkbox, because checkbox means you have to accept it to the next step.

Means when options' length is greater than 1, use radio buttons? Otherwise, use checkbox?

@Keith-CY
Copy link
Collaborator

Keith-CY commented May 27, 2022

image Use radio instead of checkbox if only one option is allowed
image We should not imply user to make a decision, simply disable the button
image We should not check it by default, simply disable the button

Generally, radio buttons can't be canceled and can only be switched. If there is only one option, should we just show tips to tell the user how to send sudt? And no need to show radio button?

What would it be like to show tips to tell the user how to send sudt

Like this: image Delete checkbox, similar like send cheque before, only show tips.

Ah.. I think there may be a misunderstanding
I mean the first case, there're to options, but only one is allowed to pick, we should use radio, because radio means you have to pick one but only one.
The other cases, only one option to select or unselect, can be a checkbox, because checkbox means you have to accept it to the next step.

Means when options' length is greater than 1, use radio buttons? Otherwise, use checkbox?

Almost there, we use radio button when 1 is mandatory while more than 1 are available. And we use checkboxes if it's multiple selectable or only 1 option to agree/disagree.

@yanguoyu
Copy link
Contributor Author

Use radio:

image

Remove default select:

image

@yanguoyu yanguoyu force-pushed the support-sudt-by-create branch from 8ff3205 to f4e14fa Compare June 2, 2022 04:29
@Keith-CY
Copy link
Collaborator

Keith-CY commented Jun 2, 2022

Screen.Recording.2022-06-02.at.15.08.19.mov

Balance is enough but an error is thrown.

1. set radio/checkbox color similar to nervos primary color
2. add detailed explanation of sending with new cell in tooltip
@Keith-CY Keith-CY force-pushed the support-sudt-by-create branch from 45ee7ad to f4e14fa Compare June 2, 2022 10:18
@Cedar67
Copy link
Contributor

Cedar67 commented Jun 2, 2022

When the balance is insufficient,
Migrate to a new sUDT Asset Account, error box is displayed (as shown in the right image below)
Expected: When click Migrate button, will info be prompted at the top (as shown in the left image below)?

Wallet c1 - Neuron

@yanguoyu
Copy link
Contributor Author

yanguoyu commented Jun 3, 2022

When the balance is insufficient, Migrate to a new sUDT Asset Account, error box is displayed (as shown in the right image below) Expected: When click Migrate button, will info be prompted at the top (as shown in the left image below)?

Wallet c1 - Neuron

fixed by 18c55b4

@Keith-CY
Copy link
Collaborator

Keith-CY commented Jun 6, 2022

How is it going @Cedar67

@Cedar67
Copy link
Contributor

Cedar67 commented Jun 6, 2022

The following scenarios were verified and passed.

✅ 1 - acp/sudt -> secp256k1 address: Cheque lock cell or secp256k1/sudt cell.
✅ 2 - acp/sudt -> acp/sudt:

  • Send to exist acp/sudt cell.

  • create a acp/sudt cell.

✅ 3 - acp/sudt -> unknow address: create a unknow/sudt cell.
✅ 4 - acp/ckb -> secp256k1 address: Create a secp256k1 lock cell.
✅ 5 - acp/ckb -> acp/ckb address:

  • Send to exist address

  • Send to unknow address: throw error

Today I'll also test some exceptions in detail and verify 18c55b4. If everything goes well, I will approve this PR today.

@Cedar67
Copy link
Contributor

Cedar67 commented Jun 6, 2022

When the balance is insufficient, Migrate to a new sUDT Asset Account, error box is displayed (as shown in the right image below) Expected: When click Migrate button, will info be prompted at the top (as shown in the left image below)?
Wallet c1 - Neuron

fixed by 18c55b4

It is verified.

@Keith-CY Keith-CY merged commit eaf8fe5 into nervosnetwork:develop Jun 6, 2022
@yanguoyu yanguoyu deleted the support-sudt-by-create branch June 7, 2022 07:45
@Keith-CY Keith-CY mentioned this pull request Jun 9, 2022
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

Successfully merging this pull request may close these issues.

4 participants