Lamden / clove

Exchange cryptocurrencies in a trustless manner using atomic swaps and an easy Python interface.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unify Ethereum redeem/refund show_details output

trojkat opened this issue · comments

Current BTC output:

alice_redeem.show_details()

{'fee': 0.00092647,
 'fee_per_kb': 0.00239399,
 'fee_per_kb_text': '0.00239399 LTC / 1 kB',
 'fee_text': '0.00092647 LTC',
 'recipient_address': 'LXRAXRgPo84p58746zaBXUFFevCTYBPxgb',
 'size': 387,
 'size_text': '387 bytes',
 'transaction': '01000000015322ad6edd25cc9f2f7dbec73b4d1b123b8abe7fc0e4acb1ec6bf112e1b5b9a500000000fd2c01483045022100ef9d2fb0664f887ecd4cdd82224ce77ff776feef53f0ab1cf030ae7e3517908a02206b266801d84dc4c530681e678073b38596268eff3ed6f7df2503f9a7ca62a98e01410459cdb91eb7298bc2578dc4e7ac2109ac3cfd9dc9818795c5583e720d2114d540724bf26b4541f683ff51968db627a04eecd1f5cff615b6350dad5fb595f8adf4406138493459626f49584d656978426f7856344336674871414747416b6b744c6d6c7362757438424a6a6c34417447315670794c394c5636566e5047644c34436c514c5d63a820277d550c9e338408e1573bbc8ec01c1accecdbe89caa46fa35ce71da441dd23a8876a91485c0522f6e23beb11cc3d066cd20ed732648a4e66704f500b15ab17576a914621f617c765c3caa5ce1bb67f6a3e51382b8da296888ac000000000159d80d00000000001976a91485c0522f6e23beb11cc3d066cd20ed732648a4e688ac00000000',
 'transaction_address': '25e3b32de672c1f287424a0a9ef23984f5132fc184b182d25476795761925ad2',
 'value': 0.01,
 'value_text': '0.01000000 LTC'}

ETH:

alice_redeem.show_details()
{'data': '0xeda1122c08e9c272d89ae1ace4742b63c81cccd39c5e522797b13a3d658a2e98e8d2fa46',
 'gasprice': 1502509001,
 'hash': '0xbf0b86b80ca9780c7e992c9c5bf5fc8db75e434821fc0a51545e469f554f9878',
 'nonce': 38,
 'r': 6619681093468524871300212268069557026551431096455532065744213525191028902851,
 's': 54116049887660939108025236380735733979818566990249960672514562083860609299923,
 'sender': '0x999f348959e611f1e9eab2927c21e88e48e6ef45',
 'startgas': 100000,
 'to': '0x9f7e5402ed0858ea0c5914d44b900a42c89547b8',
 'v': 28,
 'value': Decimal('1'),
 'value_text': '1.000000000000000000 ETH'}

We need to set transaction.type based on contract.type and then modify the show_details for transaction.

add:

  • transaction (current transaction.raw_tranaction)
  • transaction_address (current hash)
  • recipient_address (current sender)

QA done