mirror of
https://github.com/lightninglabs/faraday.git
synced 2026-08-13 12:33:35 +02:00
This commit adds a new implementation of the fiatBackend interface which uses user provided prices data.
18 lines
321 B
Go
18 lines
321 B
Go
package fiat
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
// customPrices implements the fiatBackend interface.
|
|
type customPrices struct {
|
|
entries []*Price
|
|
}
|
|
|
|
// rawPriceData returns the custom price point entries.
|
|
func (c *customPrices) rawPriceData(_ context.Context, _,
|
|
_ time.Time) ([]*Price, error) {
|
|
|
|
return c.entries, nil
|
|
}
|