-
Notifications
You must be signed in to change notification settings - Fork 8
Description
The issue with the current implementation is that SendCreateWallet will return true even if the resulting player wallet as no Address assigned. This means that expected workflow for creating a managed player and immediately assigning them to a FuelTank will fail (SendCreateWallet .success -> GetWallet.success -> AddAccount using returned wallet.Account.Address) If you add a wait 3secs or so between succesfull SendCreateWallet and GetWallet you might get lucky and have the Address field field filled out. This not ideal.
Solution 1. SendCreateWallet only returns true when Wallet has been completely formed (with Address and Public Key).
Solution 2. SendCreateWallet returns a Transaction for the Wallet creation (with Address and Public Key).
Since creating a managed player and adding a FuelTank ref is expected to be the most common scenario why not do both in one call
Solution 3. SendCreateWallet.SetTankId().SetExternalId() for a combined create managed wallet + add fueltank. Returning a Transaction.