helix-bridge / wormhole-ui

https://wormhole-ui.vercel.app/
2 stars 1 forks source link

Darwinia > Ethereum | Balance 读取的数值是全部的amount,其中也包含了locked 的 amount,应该把这部分locked的数量去掉。 #142

Closed 1022ranji closed 2 years ago

1022ranji commented 2 years ago

Prerequisites

Importance

General

Priority

High

Description

image

How to reproduce this issue

.

Actual behavior

.

Expected behavior

.

Please provide the environment you discovered this bug in

No response

Anything else?

No response

1022ranji commented 2 years ago

我尝试了下转账,弹出了转账成功的页面,但是实际上并未成功。 image

sxlwar commented 2 years ago

image polkadot apps

api.derive.balances.all(account) result image api.query.system.account(account) result image

WoeOm commented 2 years ago
        可转账余额可以使用
        // type = 0 query ring balance.  type = 1 query kton balance.
        const ringUsableBalance = await window.darwiniaApi.rpc.balances.usableBalance(0, account);
        const ktonUsableBalance = await window.darwiniaApi.rpc.balances.usableBalance(1, account);
sxlwar commented 2 years ago

@WoeOm 倒是可以,感觉这几个接口有点乱,导致各个应用显示的不一样,或者对于 freeBalance 的定义都不一样

WoeOm commented 2 years ago

不同网络获取可用余额的方式都可能不同,要做配置。

sxlwar commented 2 years ago

在哪配置? 不同方法获取的可用余额应该相同

如果按 rpc 的方法,polkadot apps上显示的数据明显不对

WoeOm commented 2 years ago

是指在虫洞做适配,不同网络实现不同获取余额的方法。

sxlwar commented 2 years ago

问题是可用余额要不要在各个应用间保持一致?

AurevoirXavier commented 2 years ago

在哪配置? 不同方法获取的可用余额应该相同

如果按 rpc 的方法,polkadot apps上显示的数据明显不对

我们的锁改过,polkadot apps 的逻辑不适应