package grpc

import (
	"testing"

	"hyapp/services/wallet-service/internal/domain/ledger"
)

func TestDebitGiftResponseFromReceiptIncludesBalanceVersion(t *testing.T) {
	response := debitGiftResponseFromReceipt(ledger.Receipt{BalanceAfter: 1234, BalanceVersion: 17, PaidAtMS: 1_700_000_000_000})
	if response.GetBalanceAfter() != 1234 || response.GetBalanceVersion() != 17 || response.GetPaidAtMs() != 1_700_000_000_000 {
		t.Fatalf("wallet protobuf response lost sender balance snapshot: %+v", response)
	}
}
