Skip to content

Commit

Permalink
bridge: use full token address
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikhofstadt committed Aug 28, 2020
1 parent a9dee7d commit 1eef0b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bridge/pkg/solana/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (e *SolanaBridgeWatcher) Run(ctx context.Context) error {
switch event := ev.Event.(type) {
case *agentv1.LockupEvent_New:
logger.Debug("received lockup event",
zap.Any("event", ev)) // TODO: debug level
zap.Any("event", ev)) // TODO: debug level

lock := &common.ChainLock{
TxHash: eth_common.HexToHash(ev.LockupAddress),
Expand All @@ -86,9 +86,9 @@ func (e *SolanaBridgeWatcher) Run(ctx context.Context) error {
SourceChain: vaa.ChainIDSolana,
TargetChain: vaa.ChainID(event.New.TargetChain),
TokenChain: vaa.ChainID(event.New.TokenChain),
TokenAddress: padAddress(eth_common.BytesToAddress(event.New.TokenAddress)),
Amount: new(big.Int).SetBytes(event.New.Amount),
}
copy(lock.TokenAddress[:], event.New.TokenAddress)

e.lockChan <- lock
logger.Info("found new lockup transaction", zap.String("lockup_address", ev.LockupAddress))
Expand Down

0 comments on commit 1eef0b3

Please sign in to comment.