Hey. I am withdrawing BTC from my Incognito wallet to an outer BTC wallet.
I am doing it using NodeJS SDK and working in the testnet.
After performing the transaction I see that this transaction exists in the history with status “Timed out”. The message is “There was an issue completing this transaction. Your funds have been returned. Please try again.” Of course, I have tried again.
This is the code snippet I am using to withdraw BTC:
const incognitoAmount = '80';
const requestedAmount = '0.000080';
const outerWalletAddress = 'mpgn8s96en3uMp2vcQY917gKkZz8DsgsbF';
const userFees = await walletBTCToken.bridgeWithdrawEstUserFee({
incognitoAmount: incognitoAmount,
requestedAmount: requestedAmount,
paymentAddress: outerWalletAddress
})
console.log('userFees', userFees)
const tempAddress = userFees.Address;
const txBurn = await walletBTCToken.bridgeBurningCentralized({
privacyPaymentInfoList: [
{
paymentAddressStr: tempAddress, //temp address
amount: incognitoAmount,
message: '',
},
],
nativePaymentInfoList: [
{
paymentAddressStr: userFees.FeeAddress, //fee(master) address
amount: userFees.PrivacyFees.Level1,
message: '',
},
{
paymentAddressStr: tempAddress, //temp address
amount: '100',
message: '',
},
],
memo: 'burn tx tomo',
});
console.log('tx burn', txBurn);
const withdraw = await walletBTCToken.bridgeWithdrawCentralized({
privacyFee: '',
nativeFee: '100',
tempAddress,
burningTxId: txBurn.txId,
userFeeSelection: 2, // NATIVE FEE
userFeeLevel: 1,
});
console.log('withdraw', withdraw);
This is the transaction object I see when I call bridgeGetHistory method:
{
“ID”:2703,
“UserID”:2855,
“Address”:“12Rw6EgEdYdEPCm3UKo8oDKe6NLLQRABp9MGMfXsmCZjZN2G71MRA78gNDk97nPQyNj1oBjaTsk9fc5Hw5ak2Nxh27AJ3LnVaM7bTEX”,
“ExpiredAt”:“2021-05-08T19:08:38Z”,
“EstFeeAt”:“2021-05-08T17:08:38Z”,
“AddressType”:2,
“Status”:16,
“StatusMessage”:“Timed out”,
“StatusDetail”:“There was an issue completing this transaction. Your funds have been returned. Please try again.”,
“CurrencyType”:2,
“WalletAddress”:“12S4K5ySpnCEADXBDLQ9tTbS9QMesqqHi8QKZxbuDfuDTWEUzRe1FCFTVoH5MMMgjJARHx1Nka5wYBLFscPvetfAHR6R6J4KNp4iKpb”,
“UserPaymentAddress”:“mpgn8s96en3uMp2vcQY917gKkZz8DsgsbF”,
“RequestedAmount”:“0.000080”,
“ReceivedAmount”:"",
“IncognitoAmount”:"",
“EthereumTx”:"",
“IncognitoTx”:"",
“Erc20TokenTx”:"",
“PrivacyTokenAddress”:“4584d5e9b2fc0337dfb17f4b5bb025e5b82c38cfa4f54e8a3d4fcdd03954ff82”,
“Erc20TokenAddress”:"",
“CreatedAt”:“2021-05-08T17:08:38Z”,
“UpdatedAt”:“2021-05-08T17:08:48Z”,
“Decentralized”:0,
“OutChainTx”:"",
“InChainTx”:"",
“TokenFee”:"",
“PrivacyFee”:“304999”,
“OutChainPrivacyFee”:“304999”,
“OutChainTokenFee”:"",
“BurnTokenFee”:"",
“BurnPrivacyFee”:“100”,
“IncognitoTxToPayOutsideChainFee”:“a8c82d02c44e69766bf2985532ff0507160d7c156a037699433ea3049a2ecaeb”,
“Note”:"",
“Memo”:"",
“NewShieldDecentralized”:0
}
Could anyone please explain me why am I getting timeout? Maybe should I use bridgeWithdrawDecentralized
method? Maybe I don’t need to use address from userFees.Address
? Or maybe my outer BTC address (mpgn8s96en3uMp2vcQY917gKkZz8DsgsbF) is not supported by Incognito? Maybe I need to somehow confirm it?