Open gabrielbazan7 opened 6 years ago
@gabrielbazan7 responding to your comment: https://github.com/bitpay/copay-recovery/issues/86#issuecomment-343915793.
Running with Chrome Console output now... Will post results.
Nothing in the console output.
Could you download the project and make some tests ? Try deleting lines 313 to 326 in src -> app -> services -> recovery.service.ts . This ones:
if (wallet.publicKeyRing) {
let hdPublicKey;
let derivedItemsArray = [].concat(derivedItems);
let path = derivedItemsArray[0].path;
let n = parseInt(_.last(path.split('/')).toString());
derivedPublicKeys = [];
wallet.publicKeyRing.forEach((item) => {
if (wallet.derivationStrategy == 'BIP45')
hdPublicKey = new self.bitcore.HDPublicKey(item.xPubKey).deriveChild(2147483647).deriveChild(n).deriveChild(index);
if (wallet.derivationStrategy == 'BIP44')
hdPublicKey = new self.bitcore.HDPublicKey(item.xPubKey).deriveChild(n).deriveChild(index);
derivedPublicKeys.push(hdPublicKey.publicKey);
});
}
Just tried. Ran npm install
and ng serve
and I'm getting this fatal error in the browser:
index.js:12 Uncaught Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.
at Object.webpackJsonp.../../../../bitcore-mnemonic/node_modules/bitcore-lib/index.js.bitcore.versionGuard (index.js:12)
at Object.<anonymous> (index.js:15)
at Object.../../../../bitcore-mnemonic/node_modules/bitcore-lib/index.js (index.js:69)
at __webpack_require__ (bootstrap 9fad9ceb3f0c1250614e:54)
at Object.<anonymous> (mnemonic.js:3)
at Object.../../../../bitcore-mnemonic/lib/mnemonic.js (mnemonic.js:297)
at __webpack_require__ (bootstrap 9fad9ceb3f0c1250614e:54)
at Object.../../../../bitcore-mnemonic/index.js (index.js:1)
at __webpack_require__ (bootstrap 9fad9ceb3f0c1250614e:54)
at Object.../../../../../src/app/services/recovery.service.ts (app.module.ts:21)
Sorry about that. Modify this package.json dependencies:
"bitcore-mnemonic": "1.2.5"
"bitcore-lib": "0.14.0"
Remove the ^
.
Then remove node_modules and run npm i again.
Then follow the README to fix the Crypto issue.
Got it. That fixed the runtime.
OK. Just ran the tool locally with lines 313 to 326 removed. Same result. 0 BCH. :-(
Did the tool find any active address if you set BTC instead of BCH?
Not sure how to answer that. I left the address gap to 20 (default). And I see 'Inactive Address Streak' increment during the run. I don't see console / browser output showing if I have any 'active address'.
@morrisonbrett ensure to select all levels
if you are using Chrome.
Try to modify line 80 in src -> app -> services -> recovery.service.ts. Remove payload.addressType
and leave P2SH
only.
That is an old file backup? if the answer is yes. Could you try importing in Copay, and exporting again for new file backup?
@JDonadio yes it's all levels.
@gabrielbazan7 The wallet is in CoPay. I've tried both a backup I have from 01/2017 and from a few days ago.
Try the first option, modify that line and try again.
Tried modifying that line, and I got a CORS error.
OK. I installed a CORS chrome extension and it's running now with line 82 modified. Console is "active addresses" on BTC, but then error for the address.
It seems that insight is down... Sorry.. I will tell you when it starts working again.
BCH hardfork is happening right now... so, we have to wait for insight update. But, try with BTC instead of BCH, tell me if you find active addresses
I'm not seeing any active addresses in the Console.
With the line I told you modified ?
Yes, with that line modified. None.
Please tell me this isn't hopeless. I've been using CoPay exclusively since January. The coins were in my CoPay wallet pre-fork. Not seeing the address has me worried.
Let's try to fix the problem together tomorrow.
Thx. We can share screens if that helps.
Sure !
I send you an email
Replied
How's it looking?
I could find some BCH. But not all... your backup file seems to be corrupt. I modified the line I told you. No more changes to the code, only this:
Try to modify line 80 in src -> app -> services -> recovery.service.ts. Remove payload.addressType and leave P2SH only.
the credentials object should be :
var credential = {
walletId: payload.walletId,
copayerId: payload.copayerId,
publicKeyRing: payload.publicKeyRing,
xPriv: xPriv,
derivationStrategy: "BIP45",
addressType: "P2SH",
m: m,
n: n,
network: network,
coin: coin,
from: "backup",
};
finding 6.21433319 BCH from H6muxFAM1MYx1f3zVQ8j2dZH11CaKWYrc6
, HC4psyg1eFmrnqwVnUYXccE1buXbxuvqtB
and H9rTadZF2kWBpG3SARt57N6ERKrUkdrcV3
.
Let me investigate further. You are right that this address belongs to your wallet and have balance: HFwJ6e1X54bzWZ4ZpHGSoNBt9SFkFt2g8i
It's ok if you want to move that 6.21433319 BCH balance to a new BCH wallet.
Would it help if we did a screen share?
No for the moment. Thanks.
Those addresses that start with H. They're not showing up on Blocktrail.
Try using https://bch-insight.bitpay.com/. Blocktrail do not support the new addresses convention for BCH. https://support.bitpay.com/hc/en-us/articles/115004671663-BitPay-s-Adopted-Conventions-for-Bitcoin-Cash-Addresses-URIs-and-Payment-Requests
If you want to use another block-explorer you should translate it using the address translator tool
Looking at this, how did it get to 0 balance? I've never moved BCH. It says it was 'mined' on 08/04 and then is moved out of there.
After running the tool, I see I can transfer the BCH. Should I go for it? And then we can try and recover the rest?
Yes. I'm closer to make it work.
OK. It's on its way to my new Copay[BCH] wallet!
"Closer to make it work". Fingers crossed @gabrielbazan7. Thank you!
Noticed the BCH network is slowwwww. It's still an unconfirmed transaction.
Sorry, we still having problems with our backend. I will let you know when the tool start working fine again.
I just send a PR with fix. I was able to find your BCH :) !! Could you try now ? Do a pull of master branch. And remember to do this :
Try to modify line 80 in src -> app -> services -> recovery.service.ts. Remove payload.addressType and leave P2SH only.
YOU FOUND IT??!!! I'm a little confused. Didn't I already do this? Also, I don't see your PR fixing this. Should I just pull master from your repo and run that version?
Also - I submitted a PR too for some cosmetic fixes.
Yes! It's already on master.
OK - with latest master and that line commented out - I SEE THE RIGHT BALANCE PRE-FORK!!!
Yes!!!!
I increased the BCH transaction fee to 0.005 (around $6 at today's price), and I'm re-running. Maybe that will make the transaction confirm much sooner than the default of 0.0001. Because my attempt to move coins yesterday is still unconfirmed. Not trying to "double spend" here. Hopefully this higher-fee one goes through and the other one will get rejected.
OK. Just tried to send to my new Copay BCH wallet. I got this: Could not build tx: TypeError: Address has mismatched network type.
.
Should I run this through your address translator? Why isn't the Copay wallet generating the native address?
Yes, use the address translator. Translate the address that Copay wallet is given to you and use that one on the tool.
I'm now getting: Please enter a valid address.
Also, is it OK / smart that I increased the fee?
Let me test it.
smart that I increased the fee?
^ that's ok.
I tried just now using the Bitcoin.com wallet, which I noticed is similar to Copay / Bitpay. That receiving address didn't work either.
morrisonbrett:
I'm having the same issue. My older, Derivation Strategy BIP45 wallet had BTC in it pre-fork, and I'm not seeing anything in the recovery tool. Wallet ID: 4b3133503ee52b85