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
62 stars 47 forks source link

Contract messages with AccountId as args have multiple input fields #367

Closed DoubleOTheven closed 1 year ago

DoubleOTheven commented 1 year ago

Describe the bug See image.

To Reproduce Steps to reproduce the behavior:

This function generates the UI seen in the screenshot

        type PlayerId = AccountId;

        #[ink(message)]
        pub fn register_player(&mut self, id: PlayerId) {
            // ... code
        }

Expected behavior There should be a single input field for the UI as it is on https://polkadot.js.org/apps/#/contracts

Screenshots

Screen Shot 2022-09-30 at 12 39 24 PM

Desktop (please complete the following information):

athei commented 1 year ago

I think this are a actually two issues:

  1. Yes. A array or vector of u8 should display as hex input as in polkadot.js right now.
  2. But this should be an AccountId which used to render as a list of knows accounts. The reason for this not happening are probably two:
statictype commented 1 year ago

this was fixed with https://github.com/polkadot-js/api/pull/5237