public async Task <double> GetLimitByAssetAsync(string assetId) { var record = await _tableStorage.GetDataAsync(WithdrawLimitRecord.GeneratePartitionKey(), WithdrawLimitRecord.GenerateRowKey(assetId)); if (record == null || record.LimitAmount <= 0) { return(_defaultLimit); } return(record.LimitAmount); }
public async Task <bool> DeleteAsync(string assetId) { return(await _tableStorage.DeleteIfExistAsync(WithdrawLimitRecord.GeneratePartitionKey(), WithdrawLimitRecord.GenerateRowKey(assetId))); }