Skip to content

Commit c241052

Browse files
committed
Disable DeclareFiatOnrampPurchaseAttempt when core mint account is USDC
1 parent b08a9b7 commit c241052

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/code/server/transaction/onramp.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ func (s *transactionServer) DeclareFiatOnrampPurchaseAttempt(ctx context.Context
2222
log := s.log.WithField("method", "DeclareFiatOnrampPurchaseAttempt")
2323
log = client.InjectLoggingMetadata(ctx, log)
2424

25+
if common.CoreMintAccount.PublicKey().ToBase58() == common.UsdcMintAccount.PublicKey().ToBase58() {
26+
log.Warn("core mint account is usdc")
27+
return nil, status.Error(codes.Unavailable, "")
28+
}
29+
2530
var deviceType client.DeviceType
2631
userAgent, err := client.GetUserAgent(ctx)
2732
if err == nil {

0 commit comments

Comments
 (0)