swaponline / MultiCurrencyWallet

Bitcoin, Ethereum, ERC20 crypto wallets with 0x and atomic swap exchange.
https://swaponline.github.io
MIT License
475 stars 487 forks source link

swap: mark stucked swap as "this swap cannot be completed (timeout)" #3166

Open noxonsu opened 4 years ago

noxonsu commented 4 years ago

суть в том что он не смог заморозить эфир (видимо на газ не хватило или 1 конфирам ждали долго), наш бот сделал себе рефанд. а юзер все ждал и ждал.

Christian-RIZE commented 4 years ago

It is mine order:

Check debug

bitcoinjs.script.compile([ bitcoin.core.opcodes.OP_RIPEMD160, Buffer.from('54cb357c9e6c973dc281ba451dcb3ab80d0a32e9', 'hex'), bitcoin.core.opcodes.OP_EQUALVERIFY,

Buffer.from('0303bb186d698e2ac467853476676ad8038b26047d11743007d8fa4391178a9db1', 'hex'), bitcoin.core.opcodes.OP_EQUAL, bitcoin.core.opcodes.OP_IF,

Buffer.from('0303bb186d698e2ac467853476676ad8038b26047d11743007d8fa4391178a9db1', 'hex'), bitcoin.core.opcodes.OP_CHECKSIG,

bitcoin.core.opcodes.OP_ELSE,

bitcoin.core.script.number.encode(1597284523), bitcoin.core.opcodes.OP_CHECKLOCKTIMEVERIFY, bitcoin.core.opcodes.OP_DROP, Buffer.from('02bbbe3d669101ff69a1905aa8b3181c03ce901d5f2c1fd673cbe236624553e68d', 'hex'), bitcoin.core.opcodes.OP_CHECKSIG,

bitcoin.core.opcodes.OP_ENDIF, ])

{ "step": 5, "isStoppedSwap": false, "signTransactionHash": null, "isSignFetching": true, "isMeSigned": true, "targetWallet": null, "secretHash": "54cb357c9e6c973dc281ba451dcb3ab80d0a32e9", "btcScriptValues": { "secretHash": "54cb357c9e6c973dc281ba451dcb3ab80d0a32e9", "ownerPublicKey": "02bbbe3d669101ff69a1905aa8b3181c03ce901d5f2c1fd673cbe236624553e68d", "recipientPublicKey": "0303bb186d698e2ac467853476676ad8038b26047d11743007d8fa4391178a9db1", "lockTime": 1597284523 }, "btcScriptVerified": true, "isBalanceFetching": false, "isBalanceEnough": true, "balance": 0.02, "btcScriptCreatingTransactionHash": "13bd147a792143064d1397b5544e839dfa1d8eeacf21894dc8f60c9bd41df50d", "ethSwapCreationTransactionHash": null, "canCreateEthTransaction": true, "isEthContractFunded": false, "secret": null, "isEthWithdrawn": false, "isBtcWithdrawn": false, "ethSwapWithdrawTransactionHash": null, "btcSwapWithdrawTransactionHash": null, "refundTransactionHash": null, "isRefunded": false, "isFinished": false, "isSwapExist": false, "withdrawRequestIncoming": false, "withdrawRequestAccepted": false, "isFailedTransaction": false, "isFailedTransactionError": null }

Christian-RIZE commented 4 years ago

It is still stuck