Skip to content

Commit

Permalink
fix(nats): clean up.
Browse files Browse the repository at this point in the history
- Removes unused counterParty function argument.
- Removes unnecessary type casting.

Closes #28
  • Loading branch information
Mango Habanero committed Apr 30, 2023
1 parent 554ffd9 commit 30759b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib/nats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ async function getUser(
db: PostgresDb,
redis: RedisClient,
address: string,
isSender: boolean,
counterparty?: any
isSender: boolean
): Promise<[null, null] | [User, UserService]> {
const phoneNumber = await getPhoneNumberFromAddress(address, db, redis);

Expand All @@ -86,7 +85,7 @@ async function getUser(
if (!user) {
throw new SystemError(`Could not find recipient: ${phoneNumber}`);
}
return [user as User, userService];
return [user, userService];
}

async function updateUser(
Expand All @@ -110,7 +109,6 @@ async function updateUser(
});
}


async function processRegistrationEvent(
db: PostgresDb,
graphql: GraphQLClient,
Expand Down

0 comments on commit 30759b8

Please sign in to comment.