Skip to content

Commit 341543d

Browse files
committed
Disable LinkAdditionalAccounts when core mint is USDC
1 parent bc1bb03 commit 341543d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/code/server/account/server.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ func (s *server) LinkAdditionalAccounts(ctx context.Context, req *accountpb.Link
9595
log := s.log.WithField("method", "LinkAdditionalAccounts")
9696
log = client.InjectLoggingMetadata(ctx, log)
9797

98+
if common.CoreMintAccount.PublicKey().ToBase58() == common.UsdcMintAccount.PublicKey().ToBase58() {
99+
log.Warn("core mint account is usdc")
100+
return nil, status.Error(codes.Unavailable, "")
101+
}
102+
98103
owner, err := common.NewAccountFromProto(req.Owner)
99104
if err != nil {
100105
log.WithError(err).Warn("invalid owner account")

0 commit comments

Comments
 (0)