quotation bff
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
|
||||
"github.com/tech/sendico/pkg/api/http/response"
|
||||
"github.com/tech/sendico/pkg/mlogger"
|
||||
moneyv1 "github.com/tech/sendico/pkg/proto/common/money/v1"
|
||||
paginationv1 "github.com/tech/sendico/pkg/proto/common/pagination/v1"
|
||||
chainv1 "github.com/tech/sendico/pkg/proto/gateway/chain/v1"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
@@ -36,16 +35,11 @@ type walletsResponse struct {
|
||||
Page *paginationv1.CursorPageResponse `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
type walletMoney struct {
|
||||
Amount string `json:"amount"`
|
||||
Currency string `json:"currency"`
|
||||
}
|
||||
|
||||
type walletBalance struct {
|
||||
Available *walletMoney `json:"available,omitempty"`
|
||||
PendingInbound *walletMoney `json:"pendingInbound,omitempty"`
|
||||
PendingOutbound *walletMoney `json:"pendingOutbound,omitempty"`
|
||||
CalculatedAt string `json:"calculatedAt,omitempty"`
|
||||
Available *Money `json:"available,omitempty"`
|
||||
PendingInbound *Money `json:"pendingInbound,omitempty"`
|
||||
PendingOutbound *Money `json:"pendingOutbound,omitempty"`
|
||||
CalculatedAt string `json:"calculatedAt,omitempty"`
|
||||
}
|
||||
|
||||
type walletBalanceResponse struct {
|
||||
@@ -114,16 +108,6 @@ func toWalletBalance(b *chainv1.WalletBalance) walletBalance {
|
||||
}
|
||||
}
|
||||
|
||||
func toMoney(m *moneyv1.Money) *walletMoney {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
return &walletMoney{
|
||||
Amount: m.GetAmount(),
|
||||
Currency: m.GetCurrency(),
|
||||
}
|
||||
}
|
||||
|
||||
func tsToString(ts *timestamppb.Timestamp) string {
|
||||
if ts == nil {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user