|
|
@@ -13,28 +13,13 @@ proto.eth.tx.new_swap: Ethereum new swap transaction class
|
|
|
"""
|
|
|
|
|
|
from ....tx.new_swap import NewSwap as TxNewSwap
|
|
|
-from .new import New, TokenNew
|
|
|
-
|
|
|
-class NewSwap(New, TxNewSwap):
|
|
|
- desc = 'Ethereum swap transaction'
|
|
|
|
|
|
- def update_data_output(self, trade_limit):
|
|
|
- parsed_memo = self.swap_proto_mod.Memo.parse(self.swap_memo)
|
|
|
- self.swap_memo = str(self.swap_proto_mod.Memo(
|
|
|
- self.swap_cfg,
|
|
|
- self.recv_proto,
|
|
|
- self.recv_asset,
|
|
|
- self.recv_proto.coin_addr(parsed_memo.address),
|
|
|
- trade_limit = trade_limit))
|
|
|
- self.set_gas_with_data(self.swap_memo.encode())
|
|
|
+from ...vm.tx.new_swap import VmNewSwap
|
|
|
|
|
|
- @property
|
|
|
- def vault_idx(self):
|
|
|
- return 0
|
|
|
+from .new import New, TokenNew
|
|
|
|
|
|
- @property
|
|
|
- def vault_output(self):
|
|
|
- return self.outputs[0]
|
|
|
+class NewSwap(VmNewSwap, New, TxNewSwap):
|
|
|
+ desc = 'Ethereum swap transaction'
|
|
|
|
|
|
class TokenNewSwap(TokenNew, NewSwap):
|
|
|
desc = 'Ethereum token swap transaction'
|