diff --git a/internal/dashboard/mapper_wallet.go b/internal/dashboard/mapper_wallet.go index 6f5d218..a18e215 100644 --- a/internal/dashboard/mapper_wallet.go +++ b/internal/dashboard/mapper_wallet.go @@ -19,7 +19,7 @@ var walletGameEvents = map[string]struct{}{ func (m *Mapper) mapWalletGame(ctx context.Context, schema string, table string, action string, row Row) ([]Contribution, error) { eventType := row.String("event_type") if isWalletGiftConsumeEvent(eventType) { - return m.mapWalletGift(ctx, schema, table, action, row) + return nil, nil } if !isWalletGameEvent(eventType) { return nil, nil diff --git a/internal/dashboard/mapper_wallet_test.go b/internal/dashboard/mapper_wallet_test.go index 3934784..d2fceec 100644 --- a/internal/dashboard/mapper_wallet_test.go +++ b/internal/dashboard/mapper_wallet_test.go @@ -73,7 +73,7 @@ func TestWalletLuckyGiftIsNotMappedAsGiftConsume(t *testing.T) { } } -func TestWalletGiveGiftIsMappedAsGiftConsume(t *testing.T) { +func TestWalletGiveGiftIsNotMappedAsGiftConsume(t *testing.T) { mapper := NewMapper(walletMapperTestStore{users: map[int64]UserCountry{ 1001: {UserID: 1001, SysOrigin: "LIKEI", Country: Country{Code: "BD", Name: "Bangladesh"}}, }}, []string{"LIKEI"}, "UNKNOWN", 0) @@ -92,11 +92,8 @@ func TestWalletGiveGiftIsMappedAsGiftConsume(t *testing.T) { if err != nil { t.Fatal(err) } - if len(contributions) != 1 { - t.Fatalf("expected one gift contribution, got %d", len(contributions)) - } - if !contributions[0].GiftConsume.Equal(decimal.NewFromInt(100)) { - t.Fatalf("expected gift consume 100, got %s", contributions[0].GiftConsume.String()) + if len(contributions) != 0 { + t.Fatalf("expected wallet GIVE_GIFT to be ignored, got %#v", contributions) } }