Skip to content

Commit

Permalink
added constant
Browse files Browse the repository at this point in the history
  • Loading branch information
slbmax committed Sep 11, 2024
1 parent 377a578 commit 56e5f2e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/bridge/proxy/btc/deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import (
"strings"
)

const defaultDecimals = 8
const (
defaultDecimals = 8
defaultDepositorAddressOutputIdx = 0
)

func (p *proxy) GetDepositData(id data.DepositIdentifier) (*data.DepositData, error) {
var (
Expand Down Expand Up @@ -57,7 +60,7 @@ func (p *proxy) GetDepositData(id data.DepositIdentifier) (*data.DepositData, er
return nil, errors.Wrap(err, "failed to get destination address")
}

depositor, err := p.parseSenderAddress(tx.Vin[0])
depositor, err := p.parseSenderAddress(tx.Vin[defaultDepositorAddressOutputIdx])
if err != nil {
return nil, errors.Wrap(err, "failed to get depositor")
}
Expand Down

0 comments on commit 56e5f2e

Please sign in to comment.