public (string, string) AssetToBitgoCoinAndWallet(string brokerId, string assetSymbol) { var map = _assetMap.Get(BitgoAssetMapEntity.GeneratePartitionKey(brokerId), BitgoAssetMapEntity.GenerateRowKey(assetSymbol)); if (map == null) { return(string.Empty, string.Empty); } return(map.BitgoCoin, map.BitgoWalletId); }
public string GetTagSeparator(string brokerId, string assetSymbol) { var map = _assetMap.Get(BitgoAssetMapEntity.GeneratePartitionKey(brokerId), BitgoAssetMapEntity.GenerateRowKey(assetSymbol)); if (map == null) { return(string.Empty); } return(map.TagSeparator); }
public async ValueTask <bool> DeleteBitgoAssetMapEntityAsync(string brokerId, string assetSymbol) { if (string.IsNullOrEmpty(brokerId)) { throw new Exception("Cannot delete asset map. BrokerId cannot be empty"); } if (string.IsNullOrEmpty(assetSymbol)) { throw new Exception("Cannot delete asset map. AssetSymbol cannot be empty"); } var entity = await _assetMap.GetAsync(BitgoAssetMapEntity.GeneratePartitionKey(brokerId), BitgoAssetMapEntity.GenerateRowKey(assetSymbol)); if (entity != null) { await _assetMap.DeleteAsync(BitgoAssetMapEntity.GeneratePartitionKey(brokerId), BitgoAssetMapEntity.GenerateRowKey(assetSymbol)); } return(true); }