fix: Pass additional data when community token is received (#4954)
This commit is contained in:
parent
0d9b6138d6
commit
2aa306ef4c
|
@ -63,12 +63,7 @@ type Token struct {
|
|||
}
|
||||
|
||||
type ReceivedToken struct {
|
||||
Address common.Address `json:"address"`
|
||||
Name string `json:"name"`
|
||||
Symbol string `json:"symbol"`
|
||||
Image string `json:"image,omitempty"`
|
||||
ChainID uint64 `json:"chainId"`
|
||||
CommunityData *community.Data `json:"community_data,omitempty"`
|
||||
Token
|
||||
Amount float64 `json:"amount"`
|
||||
TxHash common.Hash `json:"txHash"`
|
||||
IsFirst bool `json:"isFirst"`
|
||||
|
@ -829,14 +824,10 @@ func (tm *Manager) SignalCommunityTokenReceived(address common.Address, txHash c
|
|||
}
|
||||
|
||||
floatAmount, _ := new(big.Float).Quo(new(big.Float).SetInt(value), new(big.Float).SetInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(int64(t.Decimals)), nil))).Float64()
|
||||
t.Image = tm.mediaServer.MakeCommunityTokenImagesURL(t.CommunityData.ID, t.ChainID, t.Symbol)
|
||||
|
||||
receivedToken := ReceivedToken{
|
||||
Address: t.Address,
|
||||
Name: t.Name,
|
||||
Symbol: t.Symbol,
|
||||
Image: t.Image,
|
||||
ChainID: t.ChainID,
|
||||
CommunityData: t.CommunityData,
|
||||
Token: *t,
|
||||
Amount: floatAmount,
|
||||
TxHash: txHash,
|
||||
IsFirst: isFirst,
|
||||
|
|
Loading…
Reference in New Issue