Skip to content

Commit

Permalink
fix: sui public key fixes && data asset download fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth9890 committed Nov 4, 2024
1 parent bedfc63 commit 65e2173
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (u *AuthImpl) Login(message string, signature string, wallet_address string
return "", errors.New("invalid sui signature")
}

} else {
} else if ValidateSolanaWallet(wallet_address) {
isValid, err = VerifySolanaMessage(message, signature, wallet_address)
if err != nil {
return "", fmt.Errorf("solana signature verification failed: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion client/data_assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (u *DataAssetImpl) Share(id int64, shareDetails []ShareDataAssetRequest) ([
}

func (u *DataAssetImpl) Download(id int64) (*FileResponse, error) {
resp, err := u.Config.Client.R().
resp, err := u.Config.Client.R().SetPathParam("id", fmt.Sprintf("%v", id)).
SetOutput("temporary-file").
Get(DownloadDataAssetByID)

Expand Down
2 changes: 1 addition & 1 deletion client/sui_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func NewSuiService(walletPrivateKey string) *SuiService {
fmt.Println("Error creating keypair:", err)
}

publicKeyHex := hex.EncodeToString(pub)
publicKeyHex := ed25519PublicKeyToSuiAddress(pub)

return &SuiService{
walletPrivateKey: private,
Expand Down

0 comments on commit 65e2173

Please sign in to comment.