FrankC01 / pysui

SUI Python Client SDK
Apache License 2.0
118 stars 32 forks source link

Allow recovery of an account via the mnemonic even if it is already in SuiConfig #211

Closed kaellis closed 4 months ago

kaellis commented 4 months ago

Currently when you call SuiConfig.recover_keypair_and_address with a mnemonic (to recover an account), a ValueError will be raised, indicating that the key already exists. However the function does not inform you of the account address. This leaves the caller unaware of the address, and they can't make use of the account or recover it -- short of just creating a new SuiConfig. Instead of raising a ValueError, the mnemonic and address is just returned, since it was already created.