algorand / algorand/java-algorand-sdk

LogicSigAccount.getAddress() causes NPE after delegated with account.signLogicsig(escrowAccountLogicSig.lsig)

未關閉
#695 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
new-bug
主要語言
Java
星號
73
分支
71
平均合併
41 分鐘
30 天內合併 PR
2

描述

### LogicSigAccount.getAddress() causes NPE after delegated with account.signLogicsig(escrowAccountLogicSig.lsig)

When creating an escrow as stateless smart contract:

LogicSigAccount escrowAccountLogicSig = new LogicSigAccount(escrowAccountStatelessSmartContract.getBytes(), null)
then making it secure by delegating:
account.signLogicsig(escrowAccountLogicSig.lsig)
--> getting the address afterwards fails:
escrowStatelessSmartContractAddress = escrowAccountLogicSig.getAddress()

error Cannot invoke "com.algorand.algosdk.crypto.Ed25519PublicKey.getBytes()" because "this.sigKey" is null at com.algorand.algosdk.account.LogicSigAccount.getAddress(LogicSigAccount.java:138)

### Your environment

Algorand Java SDK 2.4

### Expected behaviour

Getting the address should also work after delegating the logicSig

### Actual behaviour

NPE :)

BTW It would be great if there is a Method in LogicSigAccount to sign/delegate, and not indirectly go via the account only, not really ObjectOriented?

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。