From 176f0ab9c94c812cef6a2d785d66be994f6a4d29 Mon Sep 17 00:00:00 2001 From: yincong Date: Tue, 11 Jun 2024 18:47:30 +0800 Subject: [PATCH] variable change to private types --- accounts/scwallet/wallet.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accounts/scwallet/wallet.go b/accounts/scwallet/wallet.go index 0f33111691..58cfc88301 100644 --- a/accounts/scwallet/wallet.go +++ b/accounts/scwallet/wallet.go @@ -75,10 +75,10 @@ var ( var ( // PinRegexp is the regular expression used to validate PIN codes. - PinRegexp = regexp.MustCompile(`^[0-9]{6,}$`) + pinRegexp = regexp.MustCompile(`^[0-9]{6,}$`) // PukRegexp is the regular expression used to validate PUK codes. - PukRegexp = regexp.MustCompile(`^[0-9]{12,}$`) + pukRegexp = regexp.MustCompile(`^[0-9]{12,}$`) ) // List of APDU command-related constants @@ -388,7 +388,7 @@ func (w *Wallet) Open(passphrase string) error { case passphrase == "": return ErrPINUnblockNeeded case status.PinRetryCount > 0: - if !PinRegexp.MatchString(passphrase) { + if !pinRegexp.MatchString(passphrase) { w.log.Error("PIN needs to be at least 6 digits") return ErrPINNeeded } @@ -396,7 +396,7 @@ func (w *Wallet) Open(passphrase string) error { return err } default: - if !PukRegexp.MatchString(passphrase) { + if !pukRegexp.MatchString(passphrase) { w.log.Error("PUK needs to be at least 12 digits") return ErrPINUnblockNeeded }