mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-09-01 09:45:13 +00:00
temporarily return floats until we fix desktop app to recieve string decimals
This commit is contained in:
parent
ca9ca09a00
commit
1fec9f52ef
1 changed files with 11 additions and 10 deletions
|
@ -7,6 +7,7 @@ from typing import List
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from torba.basemanager import BaseWalletManager
|
from torba.basemanager import BaseWalletManager
|
||||||
|
from torba.constants import COIN
|
||||||
|
|
||||||
from lbryschema.claim import ClaimDict
|
from lbryschema.claim import ClaimDict
|
||||||
|
|
||||||
|
@ -244,30 +245,30 @@ class LbryWalletManager(BaseWalletManager):
|
||||||
history.append({
|
history.append({
|
||||||
'txid': tx.id,
|
'txid': tx.id,
|
||||||
'timestamp': ts,
|
'timestamp': ts,
|
||||||
'value': tx.net_account_balance,
|
'value': tx.net_account_balance/COIN,
|
||||||
'fee': tx.fee,
|
'fee': tx.fee/COIN,
|
||||||
'date': datetime.fromtimestamp(ts).isoformat(' ')[:-3],
|
'date': datetime.fromtimestamp(ts).isoformat(' ')[:-3],
|
||||||
'confirmations': headers.height - tx.height,
|
'confirmations': headers.height - tx.height,
|
||||||
'claim_info': [{
|
'claim_info': [{
|
||||||
'address': txo.get_address(account.ledger),
|
'address': txo.get_address(account.ledger),
|
||||||
'balance_delta': -txo.amount,
|
'balance_delta': -txo.amount/COIN,
|
||||||
'amount': txo.amount,
|
'amount': txo.amount/COIN,
|
||||||
'claim_id': txo.claim_id,
|
'claim_id': txo.claim_id,
|
||||||
'claim_name': txo.claim_name,
|
'claim_name': txo.claim_name,
|
||||||
'nout': txo.position
|
'nout': txo.position
|
||||||
} for txo in tx.my_claim_outputs],
|
} for txo in tx.my_claim_outputs],
|
||||||
'update_info': [{
|
'update_info': [{
|
||||||
'address': txo.get_address(account.ledger),
|
'address': txo.get_address(account.ledger),
|
||||||
'balance_delta': -txo.amount,
|
'balance_delta': -txo.amount/COIN,
|
||||||
'amount': txo.amount,
|
'amount': txo.amount/COIN,
|
||||||
'claim_id': txo.claim_id,
|
'claim_id': txo.claim_id,
|
||||||
'claim_name': txo.claim_name,
|
'claim_name': txo.claim_name,
|
||||||
'nout': txo.position
|
'nout': txo.position
|
||||||
} for txo in tx.my_update_outputs],
|
} for txo in tx.my_update_outputs],
|
||||||
'support_info': [{
|
'support_info': [{
|
||||||
'address': txo.get_address(account.ledger),
|
'address': txo.get_address(account.ledger),
|
||||||
'balance_delta': -txo.amount,
|
'balance_delta': -txo.amount/COIN,
|
||||||
'amount': txo.amount,
|
'amount': txo.amount/COIN,
|
||||||
'claim_id': txo.claim_id,
|
'claim_id': txo.claim_id,
|
||||||
'claim_name': txo.claim_name,
|
'claim_name': txo.claim_name,
|
||||||
'is_tip': False, # TODO: need to add lookup
|
'is_tip': False, # TODO: need to add lookup
|
||||||
|
@ -275,8 +276,8 @@ class LbryWalletManager(BaseWalletManager):
|
||||||
} for txo in tx.my_support_outputs],
|
} for txo in tx.my_support_outputs],
|
||||||
'abandon_info': [{
|
'abandon_info': [{
|
||||||
'address': txo.get_address(account.ledger),
|
'address': txo.get_address(account.ledger),
|
||||||
'balance_delta': txo.amount,
|
'balance_delta': txo.amount/COIN,
|
||||||
'amount': txo.amount,
|
'amount': txo.amount/COIN,
|
||||||
'claim_id': txo.claim_id,
|
'claim_id': txo.claim_id,
|
||||||
'claim_name': txo.claim_name,
|
'claim_name': txo.claim_name,
|
||||||
'nout': txo.position
|
'nout': txo.position
|
||||||
|
|
Loading…
Add table
Reference in a new issue