Compare commits
2 Commits
da72121109
...
8b202e0c60
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b202e0c60 | |||
|
|
4626d0a1a7 |
@@ -86,10 +86,10 @@ func (p *CurrencyPair) Validate() error {
|
|||||||
if p == nil {
|
if p == nil {
|
||||||
return merrors.InvalidArgument("currency pair is required", "currncy_pair")
|
return merrors.InvalidArgument("currency pair is required", "currncy_pair")
|
||||||
}
|
}
|
||||||
if err := ValidateCurrency(p.Base, nil); err != nil {
|
if err := ValidateCurrency(p.Base, &AssetResolverStub{}); err != nil {
|
||||||
return merrors.InvalidArgument("invalid base currency in pair: "+err.Error(), "currency_pair.base")
|
return merrors.InvalidArgument("invalid base currency in pair: "+err.Error(), "currency_pair.base")
|
||||||
}
|
}
|
||||||
if err := ValidateCurrency(p.Quote, nil); err != nil {
|
if err := ValidateCurrency(p.Quote, &AssetResolverStub{}); err != nil {
|
||||||
return merrors.InvalidArgument("invalid quote currency in pair: "+err.Error(), "currency_pair.quote")
|
return merrors.InvalidArgument("invalid quote currency in pair: "+err.Error(), "currency_pair.quote")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user