Skip to content

Commit

Permalink
feat: expose dapp id in notification channel subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmbl committed Apr 18, 2024
1 parent 5d0b960 commit 3067e2b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## [1.7.8] - 2024-04-18

- feat: expose dapp id in notification channel subscriptions

## [1.7.7] - 2024-04-12

- feat: hide req id from client error message
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dialectlabs/sdk",
"version": "1.7.7",
"version": "1.7.8",
"repository": "git@github.com:dialectlabs/sdk.git",
"author": "dialectlabs",
"license": "Apache-2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/address/addresses.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export function toAddressType(type: AddressTypeDto): AddressType {

export interface DappAddress {
id: string;
dappId: string;
enabled: boolean;
channelId?: string | null;
address: Address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export class DappTelegramBotConfigurationDto {
export class DappAddressDto {
readonly id!: string;
readonly enabled!: boolean;
readonly dapp!: DappDto;
readonly channelId?: string;
readonly address!: AddressDto;
}
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/internal/dapp/dapp-addresses-facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class DappAddressesFacade implements DappAddresses {
walletDappAddresses.reduce((prev, curr) => ({
id: prev.id,
enabled: prev.enabled && curr.enabled,
dappId: prev.dappId,
address: {
id: prev.id,
value: walletPublicKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export function toDappAddress(dto: DappAddressDto) {
id: dto.id,
enabled: dto.enabled,
channelId: dto.channelId,
dappId: dto.dapp.id,
address: {
id: dto.address.id,
type: toAddressType(dto.address.type),
Expand Down

0 comments on commit 3067e2b

Please sign in to comment.