-
Notifications
You must be signed in to change notification settings - Fork 16
Support specified wallet to get balance information #814
base: bixin_dev
Are you sure you want to change the base?
Support specified wallet to get balance information #814
Conversation
9b8dbcc to
f7e4df0
Compare
f7e4df0 to
ed4e5ba
Compare
taimanhui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我只看了一部分,感觉第二个commit好像多做了一些和发送无关的内容,你是想直接全部去掉self.wallet吗,但是又好像不太彻底...
最好只改现在app需要的那部分,或者其实前端多使用select_wallet还是switch_wallet(我忘了是哪个)也能够解决问题,除了取余额之类的操作,发送相关的不太可能说需要同时对两个钱包去进行调用,那么完全可以多做切换就好了...
| return coins | ||
|
|
||
| def format_return_data(self, feerate, size, block): | ||
| def format_return_data(self, feerate, size, block, coin): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个其实只是btc的用,所以,写死btc就好了
| """ | ||
| self._assert_wallet_isvalid() | ||
|
|
||
| wallet = self.get_wallet_by_name(id) if id else self.wallet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不太合理,把id作为一个必须的属性,然后去掉self.wallet会更好点,就是直接抛弃self.wallet了。那么get_wallet_by_name里找不到wallet的话可以抛出找不到钱包的统一异常
| else if coin is "eth": | ||
| json like {"gas_price": 110, "time": 0.25, "gas_limit": 36015, "fee": "0.00396165", "fiat": "5.43 USD"} | ||
| """ | ||
| wallet = self.get_wallet_by_name(id) if id else self.wallet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
|
|
||
| try: | ||
| self._assert_wallet_isvalid() | ||
| wallet = self.get_wallet_by_name(id) if id else self.wallet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要检查是btc的钱包
现在的新页面设计是需要的 总资产里边点进去需要支持直接转账 并且回到钱包页面的时候 不能切换钱包 |
|
上周最后的结论是隐藏掉所有资产页面进去之后的转账功能,等我们解耦之后才来处理,所以这个留着或者关掉都可以,做个记录 |
What does this implement/fix? Explain your changes.
commit1:get_wallet_balance支持指定钱包获取余额
commit2:转账相关接口支持指定钱包操作
Does this close any currently open issues?
If it fixes a bug or resolves a feature request, be sure to link to that issue.
…
Pull request type
Put an
xin the boxes that applyWhere has this been tested?
…
Any other comments?
…