package types

// Asset captures a chain and token identifier.
type Asset struct {
	Chain           string `bson:"chain,omitempty" json:"chain,omitempty"`
	TokenSymbol     string `bson:"tokenSymbol,omitempty" json:"tokenSymbol,omitempty"`
	ContractAddress string `bson:"contractAddress,omitempty" json:"contractAddress,omitempty"`
}

func (a *Asset) GetChain() string {
	if a == nil {
		return ""
	}
	return a.Chain
}

func (a *Asset) GetTokenSymbol() string {
	if a == nil {
		return ""
	}
	return a.TokenSymbol
}

func (a *Asset) GetContractAddress() string {
	if a == nil {
		return ""
	}
	return a.ContractAddress
}

// NetworkFeeEstimate captures network fee estimation output.
type NetworkFeeEstimate struct {
	NetworkFee        *Money `bson:"networkFee,omitempty" json:"networkFee,omitempty"`
	EstimationContext string `bson:"estimationContext,omitempty" json:"estimationContext,omitempty"`
}

func (n *NetworkFeeEstimate) GetNetworkFee() *Money {
	if n == nil {
		return nil
	}
	return n.NetworkFee
}

func (n *NetworkFeeEstimate) GetEstimationContext() string {
	if n == nil {
		return ""
	}
	return n.EstimationContext
}
