package gateway

import moneyv1 "github.com/tech/sendico/pkg/proto/common/money/v1"

func cloneMoney(m *moneyv1.Money) *moneyv1.Money {
	if m == nil {
		return nil
	}
	return &moneyv1.Money{Amount: m.GetAmount(), Currency: m.GetCurrency()}
}

func cloneMetadata(input map[string]string) map[string]string {
	if len(input) == 0 {
		return nil
	}
	clone := make(map[string]string, len(input))
	for k, v := range input {
		clone[k] = v
	}
	return clone
}
