diff --git a/pkg/storage/sqlstorage/balances_test.go b/pkg/storage/sqlstorage/balances_test.go index 4966aa17f..956cbfefa 100644 --- a/pkg/storage/sqlstorage/balances_test.go +++ b/pkg/storage/sqlstorage/balances_test.go @@ -2,6 +2,8 @@ package sqlstorage_test import ( "context" + "github.com/numary/ledger/pkg/ledgertesting" + "os" "testing" "time" @@ -173,6 +175,12 @@ func testGetBalancesAggregated(t *testing.T, store *sqlstorage.Store) { } func testGetBalancesBigInts(t *testing.T, store *sqlstorage.Store) { + + if os.Getenv("NUMARY_STORAGE_POSTGRES_CONN_STRING") != "" || + ledgertesting.StorageDriverName() != "postgres" { + return + } + amount, _ := core.ParseMonetaryInt("5522360000000000000000") var txBigInts = core.ExpandedTransaction{ Transaction: core.Transaction{ diff --git a/pkg/storage/sqlstorage/transactions.go b/pkg/storage/sqlstorage/transactions.go index b9865dd0b..386e8d0f5 100644 --- a/pkg/storage/sqlstorage/transactions.go +++ b/pkg/storage/sqlstorage/transactions.go @@ -20,7 +20,7 @@ import ( // this regexp is used to distinguish between deprecated regex queries for // source, destination and account params and the new wildcard query // which allows segmented address pattern matching, e.g; "foo:bar:*" -var addressQueryRegexp = regexp.MustCompile(`^(\w+|\*|\.\*)(:(\w+|\*|\.\*))*$`) +var addressQueryRegexp = regexp.MustCompile(`^(\w+|\*|\.\*)(:(\w+|\*|\.\*)?)*$`) func (s *Store) buildTransactionsQuery(flavor Flavor, p ledger.TransactionsQuery) (*sqlbuilder.SelectBuilder, TxsPaginationToken) { sb := sqlbuilder.NewSelectBuilder()