nebulasio / web-wallet

GNU Lesser General Public License v3.0
265 stars 188 forks source link

testnet 执行函数参数错误 #38

Closed DanisFabric closed 6 years ago

DanisFabric commented 6 years ago

合约里面两个函数

    registerUser(name) {
        let realName: string;
        if (!name || name.trim() === "") {
            realName = name;
        }  else {
            realName = "Danis";
        }
        this.users.set(Blockchain.transaction.from, realName);
    }

    test() {
        return "Call Test Function Succeed";
    }

我部署合约到testnet,然后用web-wallet调用函数test()没有问题。 2018-05-04 3 17 56 但是我调用需要传入参数的registerUser()就遇到了问题。 我不传入参数,那么报错"value must be string"。 2018-05-04 3 18 20 但是我在参数填入"Jack",输出则为空的花括号。 2018-05-04 3 18 36

ChengOrangeJu commented 6 years ago

@DanisFabric Looking into your issue, stay tuned :)

ChengOrangeJu commented 6 years ago

@DanisFabric Please use ["jack"] as the input. (you can click the ? for reference). We will further improve the use experience in the near future.

DanisFabric commented 6 years ago

It works, thanks a lot