Exemple #1
0
        public async Task RefreshWalletBalance()
        {
            using (BitPoker.NetworkClient.Blockr client = new BitPoker.NetworkClient.Blockr())
            {
                String  address = this.Wallet.Address.ToString();
                Decimal balance = await client.GetAddressBalanceAsync(address, 1);

                this.Me.Stack = Convert.ToUInt64(balance * Constants.SATOSHI);
            }
        }
Exemple #2
0
        public async Task <Boolean> JoinTable(BitPoker.Models.Messages.JoinTableRequest request)
        {
            //Check if seat is allocated

            //Check amount of BTC in that address to stop spamming
            using (BitPoker.NetworkClient.Blockr client = new BitPoker.NetworkClient.Blockr())
            {
                //Clients.Blockr client = new Clients.Blockr();
                Decimal balance = await client.GetAddressBalanceAsync(request.NewPlayer.BitcoinAddress, 2);

                if (balance > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }