Skip to content

Commit

Permalink
add ec support in transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tron committed Dec 19, 2024
1 parent c92006c commit 2c8fe1a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions wallet/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ type Sendable interface {
}

type SimpleTransfer struct {
Amount tlb.Grams
Address ton.AccountID
Comment string
Bounceable bool
Amount tlb.Grams
Address ton.AccountID
Comment string
Bounceable bool
ExtraCurrency map[int32]tlb.VarUInteger32
}

func (m SimpleTransfer) ToInternal() (message tlb.Message, mode uint8, err error) {
Expand All @@ -220,6 +221,9 @@ func (m SimpleTransfer) ToInternal() (message tlb.Message, mode uint8, err error
Dest: m.Address.ToMsgAddress(),
}
info.IntMsgInfo.Value.Grams = m.Amount
for k, v := range m.ExtraCurrency {
info.IntMsgInfo.Value.Other.Dict.Put(tlb.Uint32(k), v)
}

intMsg := tlb.Message{
Info: info,
Expand Down

0 comments on commit 2c8fe1a

Please sign in to comment.