Skip to content

Support creation timestamp in GetTokenAccountInfos #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
firebase.google.com/go/v4 v4.8.0
github.com/aws/aws-sdk-go-v2 v0.17.0
github.com/bits-and-blooms/bloom/v3 v3.1.0
github.com/code-payments/code-protobuf-api v1.16.5
github.com/code-payments/code-protobuf-api v1.16.6
github.com/emirpasic/gods v1.12.0
github.com/envoyproxy/protoc-gen-validate v1.0.4
github.com/golang-jwt/jwt/v5 v5.0.0
Expand Down Expand Up @@ -37,6 +37,7 @@ require (
github.com/ybbus/jsonrpc v2.1.2+incompatible
go.etcd.io/etcd/api/v3 v3.5.13
go.etcd.io/etcd/client/v3 v3.5.13
go.uber.org/zap v1.17.0
golang.org/x/crypto v0.21.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
golang.org/x/net v0.22.0
Expand Down Expand Up @@ -117,7 +118,6 @@ require (
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.18.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/code-payments/code-protobuf-api v1.16.5 h1:mQYhFbpqiXdecrSo9cbmP3zoUT37qWZAYOMcrWGyo78=
github.com/code-payments/code-protobuf-api v1.16.5/go.mod h1:pHQm75vydD6Cm2qHAzlimW6drysm489Z4tVxC2zHSsU=
github.com/code-payments/code-protobuf-api v1.16.6 h1:QCot0U+4Ar5SdSX4v955FORMsd3Qcf0ZgkoqlGJZzu0=
github.com/code-payments/code-protobuf-api v1.16.6/go.mod h1:pHQm75vydD6Cm2qHAzlimW6drysm489Z4tVxC2zHSsU=
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 h1:NmTXa/uVnDyp0TY5MKi197+3HWcnYWfnHGyaFthlnGw=
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
Expand Down
2 changes: 2 additions & 0 deletions pkg/code/server/grpc/account/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"

accountpb "github.com/code-payments/code-protobuf-api/generated/go/account/v1"
commonpb "github.com/code-payments/code-protobuf-api/generated/go/common/v1"
Expand Down Expand Up @@ -551,6 +552,7 @@ func (s *server) getProtoAccountInfo(ctx context.Context, records *common.Accoun
OriginalExchangeData: originalExchangeData,
Relationship: relationship,
Mint: mintAccount.ToProto(),
CreatedAt: timestamppb.New(records.General.CreatedAt),
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/code/server/grpc/transaction/v2/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func toDeniedErrorDetails(err error) *transactionpb.ErrorDetails {
case antispam.ReasonTooManyFreeAccountsForPhoneNumber:
code = transactionpb.DeniedErrorDetails_TOO_MANY_FREE_ACCOUNTS_FOR_PHONE_NUMBER
case antispam.ReasonTooManyFreeAccountsForDevice:
code = transactionpb.DeniedErrorDetails_TOO_MANY_FREE_ACCOUNTS_FOR_DEVIEC
code = transactionpb.DeniedErrorDetails_TOO_MANY_FREE_ACCOUNTS_FOR_DEVICE
default:
code = transactionpb.DeniedErrorDetails_UNSPECIFIED
}
Expand Down
Loading