TrustID icon indicating copy to clipboard operation
TrustID copied to clipboard

[TrustID-sdk]UnlockAccount should determine the DID to use

Open adlrocha opened this issue 5 years ago • 0 comments

Every call in the SDK requires a wallet.getDID("id") to specify the did of the wallet to use in the call. This is pretty messy. As DIDs must be unlocked before being used, I suggest that only a single DID should be unlocked at once in a wallet, and the unlocked account is the one always used in the calls. Thus, instead of having to get every time the DID we would do:

wal.unlockAccount(did)
wal.cal(...)
wal.lockAccount()

adlrocha avatar Jul 01 '20 08:07 adlrocha