Skip to content

Commit

Permalink
rename UserCoinEvent transfer enum values
Browse files Browse the repository at this point in the history
  • Loading branch information
Fan-Yang-284 committed Mar 6, 2023
1 parent 6765004 commit 2e87926
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/coin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export enum UserCoinEvent {
RpsLoss,
RpsDrawAgainstCodey,
RpsWin,
CoinTransferAcceptor,
CoinTransferReceiver,
CoinTransferSender,
}

export type Bonus = {
Expand Down Expand Up @@ -381,7 +382,7 @@ export class Transfer {
await adjustCoinBalanceByUserId(
this.state.receiver.id,
this.state.amount,
UserCoinEvent.CoinTransferAcceptor,
UserCoinEvent.CoinTransferReceiver,
<string>(this.state.reason ?? ''),
this.client.user?.id,
);
Expand All @@ -390,7 +391,7 @@ export class Transfer {
await adjustCoinBalanceByUserId(
this.state.sender.id,
<number>(-1 * this.state.amount),
UserCoinEvent.CoinTransferAcceptor,
UserCoinEvent.CoinTransferSender,
<string>(this.state.reason ?? ''),
this.client.user?.id,
);
Expand Down

0 comments on commit 2e87926

Please sign in to comment.