use-ink / contracts-ui

Web application for deploying wasm smart contracts on Substrate chains that include the FRAME contracts pallet
https://contracts-ui.substrate.io/
GNU General Public License v3.0
61 stars 44 forks source link

Option<bool> does not work when value is false #517

Closed Steven-Chang closed 7 months ago

Steven-Chang commented 9 months ago

Describe the bug Option does not work when value is false

Screenshot 2023-09-15 at 9 50 05 am

To Reproduce

  1. Go to 'https://contracts-ui.substrate.io/?rpc=wss://ws.test.azero.dev'
  2. Click on 'Add new contract'
  3. Click on 'Use on chain contract address'
  4. Paste in address input '5C6uExVKN4HtRXmmTZexzfRDEoKnRuDa6zEYQ445Sw8AnRGH'
  5. Download Metadata from 'https://res.cloudinary.com/hv5cxagki/raw/upload/v1694690121/abis/aleph_zero/az_groups_bdrmyz.json'
  6. Enter Contract Name 'Groups', upload Metadata and click 'Next' button
  7. Get TZERO from 'faucet'
  8. Create group via function 'groupsCreate'
  9. Try to update group enabled status to false via function 'groupsUpdate'

Expected behavior Group enabled to change to false.

Desktop (please complete the following information):

Environment (please complete the following information where it makes sense):

Steven-Chang commented 9 months ago

Hi @statictype, in your screenshot, you have set the value to false, but the result of the execution returns enabled: true.

statictype commented 9 months ago

i could reproduce the problem, you can't set the value to false

Steven-Chang commented 9 months ago

As a further note, I managed to set the value to false via a separate app.

peetzweg commented 7 months ago

@Steven-Chang thanks for reporting this. It's fixed now. 👍