diff --git a/client/auth.go b/client/auth.go index 02424ac..ada2515 100644 --- a/client/auth.go +++ b/client/auth.go @@ -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) diff --git a/client/data_assets.go b/client/data_assets.go index 05d1a3e..717ba4d 100644 --- a/client/data_assets.go +++ b/client/data_assets.go @@ -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) diff --git a/client/sui_service.go b/client/sui_service.go index d11db92..f5b4966 100644 --- a/client/sui_service.go +++ b/client/sui_service.go @@ -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,