artemii235 / etomic-swap

Etomic Swap Smart Contract allowing ETH and ERC20 atomic swaps on AtomicDex platform.
https://atomicdex.io/
37 stars 19 forks source link

Marketmaker changes required for GUI. #12

Closed artemii235 closed 5 years ago

artemii235 commented 6 years ago
  1. Add ETH/ERC20 balance to getCoin RPC method.
satindergrewal commented 6 years ago
  1. Add ETH/ERC20 balance to portfolio RPC method as well.
  2. ETH/ERC20 withdraw needs to use withdraw method which returns raw transaction and that raw transaction needs to be processed by sendrawtransaction method.
jl777 commented 6 years ago

it is probably much better to add ETH/ERC20 balance only to the places where it is actually getting a bitcoin type of balance. that way it is virtualizing the "balance" for the two types of coins

artemii235 commented 6 years ago

@satindergrewal

  1. getCoin method now displays ETH/ERC20 balance. Changes are merged to jl777/dev branch so you can test it from there.
  2. portfolio is periodically called by trades_loop which will cause many unnecessary balance requests. @jl777 should I use some cache? I'm also think to add a flag identifying either was LP_portfolio called by API or trades_loop.
  3. withdraw->sendrawtransaction is not preferred for ETH/ERC20 - protocol is very different from bitcoin and uses special nonce parameter - there is a chance that received ETH raw transaction will conflict with already existing/pending. Is it ok to make a different behavior for ETH withdraw? It uses different API method anyway.
artemii235 commented 5 years ago

Closing the issue as it's not actual anymore.