Esempio n. 1
0
        public static async Task <Wallet> OpenWallet()
        {
            var id     = Application.Current.Properties["WalletId"];
            var config = WalletService.BuildJsonObject("id", id.ToString());
            var creds  = WalletService.BuildJsonObject("key", "my_wallet_key");

            return(await Wallet.OpenWalletAsync(config, creds));
        }
Esempio n. 2
0
        public static async Task CreateWallet()
        {
            var id     = Guid.NewGuid();
            var config = WalletService.BuildJsonObject("id", id.ToString());
            var creds  = WalletService.BuildJsonObject("key", "my_wallet_key");
            await Wallet.CreateWalletAsync(config, creds);

            Application.Current.Properties["WalletCreationDate"] = DateTime.Now;
            Application.Current.Properties["WalletId"]           = id.ToString();
            await Application.Current.SavePropertiesAsync();
        }