public Task InsertOrReplaceAsync(IWalletBalance balance)
        {
            return(_storage.InsertOrReplaceAsync(WalletBalanceEntity.Create(balance),
                                                 existed =>
            {
                var needToUpdate = existed.UpdatedAtBlockHeight < balance.UpdatedAtBlockHeight;

                if (needToUpdate)
                {
                    _log.Info("Updating wallet balance in db", context: balance);
                }

                return existed.UpdatedAtBlockHeight < balance.UpdatedAtBlockHeight;
            }));
        }
 public Task DeleteIfExistAsync(string address, string assetId)
 {
     return(_storage.DeleteIfExistAsync(WalletBalanceEntity.GeneratePartitionKey(address),
                                        WalletBalanceEntity.GenerateRowKey(address, assetId)));
 }