modify bug from empty token-name
This commit is contained in:
parent
2e87e8fb42
commit
0cb796af0c
|
|
@ -4,5 +4,5 @@ var (
|
|||
RepoExisted int64 = -1001 // 在合约中创建项目时,项目已存在
|
||||
BalanceOverFlow int64 = -1002 // 在合约中创建项目时,预分配的用户Token累积值大于项目总Token
|
||||
|
||||
ContractAddress string = "0xcb465127073489235bBB8cF6995172a7c7420b3F"
|
||||
ContractAddress string = "0xE46EE87f19049d5705989f49305b136d0732a0Cf"
|
||||
)
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -65,6 +65,9 @@ contract OpenSource {
|
|||
Table repo_table = tableFactory.openTable(REPO_TABLE);
|
||||
Condition condition = repo_table.newCondition();
|
||||
Entries entries = repo_table.select(token_name, condition);
|
||||
if (entries.size() == 0) {
|
||||
return ("", "", 0, 0);
|
||||
}
|
||||
Entry entry = entries.get(0);
|
||||
return (entry.getString("token_Name"), entry.getString("owner"), entry.getInt("total_supply"), entry.getInt("cur_supply"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue