Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
njlie committed Jun 20, 2024
1 parent 3d569f4 commit 4a246ea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
37 changes: 18 additions & 19 deletions packages/backend/src/graphql/resolvers/wallet_address.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,25 +179,24 @@ describe('Wallet Address Resolvers', (): void => {
}
})


assert.ok(response.walletAddress)
expect(response.walletAddress).toEqual({
__typename: 'WalletAddress',
id: response.walletAddress.id,
url: input.url,
asset: {
__typename: 'Asset',
code: asset.code,
scale: asset.scale
},
publicName: input.publicName,
additionalProperties: validAdditionalProperties.map((property) => {
return {
__typename: 'AdditionalProperty',
key: property.key,
value: property.value,
visibleInOpenPayments: property.visibleInOpenPayments
}
assert.ok(response.walletAddress)
expect(response.walletAddress).toEqual({
__typename: 'WalletAddress',
id: response.walletAddress.id,
url: input.url,
asset: {
__typename: 'Asset',
code: asset.code,
scale: asset.scale
},
publicName: input.publicName,
additionalProperties: validAdditionalProperties.map((property) => {
return {
__typename: 'AdditionalProperty',
key: property.key,
value: property.value,
visibleInOpenPayments: property.visibleInOpenPayments
}
})
})
await expect(
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/graphql/resolvers/wallet_address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
CreateOptions,
UpdateOptions
} from '../../open_payments/wallet_address/service'
import { GraphQLErrorCode } from '../errors'

export const getWalletAddresses: QueryResolvers<ApolloContext>['walletAddresses'] =
async (
Expand Down Expand Up @@ -129,7 +128,8 @@ export const updateWalletAddress: MutationResolvers<ApolloContext>['updateWallet
}
)
}
const walletAddressOrError = await walletAddressService.update(updateOptions)
const walletAddressOrError =
await walletAddressService.update(updateOptions)
if (isWalletAddressError(walletAddressOrError)) {
throw new GraphQLError(errorToMessage[walletAddressOrError], {
extensions: {
Expand Down

0 comments on commit 4a246ea

Please sign in to comment.