Compare commits
	
		
			No commits in common. "460e9515849b8b0a2d305101babf40d0e82112ce" and "b440881441128658399232671a2f321a9661bc64" have entirely different histories.
		
	
	
		
			460e951584
			...
			b440881441
		
	
		
							
								
								
									
										32
									
								
								cmd/main.go
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								cmd/main.go
									
									
									
									
									
								
							@ -300,7 +300,18 @@ func (fsd *fsData) create_account(ctx context.Context, sym string, input []byte)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	f.Close()
 | 
						f.Close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	accountResp, err := createAccount()
 | 
						//accountResp, err := createAccount()
 | 
				
			||||||
 | 
						accountResp := accountResponse{
 | 
				
			||||||
 | 
							Ok: true,
 | 
				
			||||||
 | 
							Result: struct {
 | 
				
			||||||
 | 
								CustodialId json.Number `json:"custodialId"`
 | 
				
			||||||
 | 
								PublicKey   string      `json:"publicKey"`
 | 
				
			||||||
 | 
								TrackingId  string      `json:"trackingId"`
 | 
				
			||||||
 | 
							}{
 | 
				
			||||||
 | 
								CustodialId: "636",
 | 
				
			||||||
 | 
								PublicKey:   "0x8d86F9D4A4eae41Dc3B68034895EA97BcA90e8c1",
 | 
				
			||||||
 | 
								TrackingId:  "45c67314-7995-4890-89d6-e5af987754ac",
 | 
				
			||||||
 | 
							}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		fmt.Println("Failed to create account:", err)
 | 
							fmt.Println("Failed to create account:", err)
 | 
				
			||||||
@ -362,21 +373,8 @@ func (fsd *fsData) checkIdentifier(ctx context.Context, sym string, input []byte
 | 
				
			|||||||
func (fsd *fsData) unLock(ctx context.Context, sym string, input []byte) (resource.Result, error) {
 | 
					func (fsd *fsData) unLock(ctx context.Context, sym string, input []byte) (resource.Result, error) {
 | 
				
			||||||
	res := resource.Result{}
 | 
						res := resource.Result{}
 | 
				
			||||||
	pin := string(input)
 | 
						pin := string(input)
 | 
				
			||||||
	fp := fsd.path + "_data"
 | 
						if len(input) > 0 {
 | 
				
			||||||
 | 
							if pin == "0000" {
 | 
				
			||||||
	jsonData, err := os.ReadFile(fp)
 | 
					 | 
				
			||||||
	if err != nil {
 | 
					 | 
				
			||||||
		return res, err
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	var accountData map[string]string
 | 
					 | 
				
			||||||
	err = json.Unmarshal(jsonData, &accountData)
 | 
					 | 
				
			||||||
	if err != nil {
 | 
					 | 
				
			||||||
		return res, err
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if len(input) > 1 {
 | 
					 | 
				
			||||||
		if pin != accountData["AccountPIN"] {
 | 
					 | 
				
			||||||
			res.FlagSet = append(res.FlagSet, USERFLAG_INCORRECTPIN)
 | 
								res.FlagSet = append(res.FlagSet, USERFLAG_INCORRECTPIN)
 | 
				
			||||||
			res.FlagReset = append(res.FlagReset, USERFLAG_ACCOUNT_UNLOCKED)
 | 
								res.FlagReset = append(res.FlagReset, USERFLAG_ACCOUNT_UNLOCKED)
 | 
				
			||||||
			return res, nil
 | 
								return res, nil
 | 
				
			||||||
@ -430,7 +428,7 @@ func (fsd *fsData) check_account_status(ctx context.Context, sym string, input [
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	accountData["Status"] = status
 | 
						accountData["Status"] = status
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if status == "SUCCESS" {
 | 
						if status == "REVERTED" {
 | 
				
			||||||
		res.FlagSet = append(res.FlagSet, USERFLAG_ACCOUNT_SUCCESS)
 | 
							res.FlagSet = append(res.FlagSet, USERFLAG_ACCOUNT_SUCCESS)
 | 
				
			||||||
		res.FlagReset = append(res.FlagReset, USERFLAG_ACCOUNT_PENDING)
 | 
							res.FlagReset = append(res.FlagReset, USERFLAG_ACCOUNT_PENDING)
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user