message: confirm btc-ms - detect our wallet (fix)
diff: @@ -737,9 +737,22 @@ const getBalance = (ownAddress, ownDataKey) => {
  })
  }
  -const getBalanceUser = () => {
  +const getBalanceUser = (checkAddress) => {
  const { user: { btcMultisigUserData: { address } } } = getState()
  + if (!checkAddress) {
  return getBalance(address, 'btcMultisigUserData')
  + } else {
  + return getAddrBalance(checkAddress).then(({ balance, unconfirmedBalance }) => {
  + reducers.user.setBtcMultisigBalance({
  + address: checkAddress,
  + amount: balance,
  + isBalanceFetched: true,
  + unconfirmedBalance,
  + })
  +
  + return balance
  + })
  + }
  }
  const getRate = async () => {
  @@ -1084,7 +1097,8 @@ const parseRawTX = async (txHash) => {
  const txb = await bitcoin.TransactionBuilder.fromTransaction(
  bitcoin.Transaction.fromHex(txHash),
  btc.network
  - );
  + )
  +
  const parsedTX = {
  txb,
  input: [],
  @@ -1096,6 +1110,7 @@ const parseRawTX = async (txHash) => {
  amount: new BigNumber(0),
  }
  + await new Promise((inputParsed) => {
  txb.__INPUTS.forEach(async (input) => {
  const inputWallet = await getMSWalletByPubkeysHash(input.pubkeys, myBtcWallets)
  @@ -1103,6 +1118,7 @@ const parseRawTX = async (txHash) => {
  if (inputWallet.address) parsedTX.from = inputWallet.address
  parsedTX.wallet = inputWallet
  parsedTX.isOur = true
  + console.log('our', parsedTX.from)
  }
  parsedTX.input.push({
  @@ -1111,14 +1127,15 @@ const parseRawTX = async (txHash) => {
  publicKeys: input.pubkeys.map(buf => buf.toString('hex')),
  })
  })
  -
  + inputParsed()
  + }).then(() => {
  txb.__TX.outs.forEach((out) => {
  let address
  try {
  address = bitcoin.address.fromOutputScript(out.script, btc.network)
  } catch (e) { }
  - if (!myBtcAddreses.includes(address)) {
  + if (parsedTX.from !== address) {
  if (!parsedTX.out[address]) {
  parsedTX.out[address] = {
  to: address,
  @@ -1140,6 +1157,7 @@ const parseRawTX = async (txHash) => {
  if (Object.keys(parsedTX.out).length) {
  parsedTX.to = parsedTX.out[Object.keys(parsedTX.out)[0]].to
  }
  + })
  return parsedTX
  }
  @@ -1347,4 +1365,5 @@ export default {
  signToUserMultisig,
  getSmsKeyFromMnemonic,
  fetchMultisigBalances,
  + getAddrBalance,
  }
  