Documentation
¶
Index ¶
- Constants
- Variables
- func CalculateUsdMarketValue(ctx context.Context, data code_data.Provider, mint *common.Account, ...) (float64, float64, error)
- func GetLatestExchangeRateTime() time.Time
- func ValidateClientExchangeData(ctx context.Context, data code_data.Provider, ...) (bool, string, error)
- type SendLimit
Constants ¶
View Source
const (
MaxDailyUsdLimit = 1_000.00
)
Variables ¶
View Source
var (
SendLimits = map[currency_lib.Code]SendLimit{}/* 166 elements not displayed */
)
todo: Better way of managing all of this
Functions ¶
func CalculateUsdMarketValue ¶
func CalculateUsdMarketValue(ctx context.Context, data code_data.Provider, mint *common.Account, quarks uint64, at time.Time) (float64, float64, error)
CalculateUsdMarketValue calculates the current USD market value of a crypto amount in quarks.
func GetLatestExchangeRateTime ¶
GetLatestExchangeRateTime gets the latest time for fetching an exchange rate. By synchronizing on a time, we can eliminate the amount of perceived volatility over short time spans.
func ValidateClientExchangeData ¶
func ValidateClientExchangeData(ctx context.Context, data code_data.Provider, proto *transactionpb.ExchangeData) (bool, string, error)
ValidateClientExchangeData validates proto exchange data provided by a client
Types ¶
Click to show internal directories.
Click to hide internal directories.