Przeglądaj źródła

Rename "deposit" to "add tokens"

Connor Prussin 1 rok temu
rodzic
commit
c929c4e55c

+ 3 - 3
apps/staking/src/api.ts

@@ -83,7 +83,7 @@ export type StakeDetails = ReturnType<
 >;
 
 export enum AccountHistoryItemType {
-  Deposit,
+  AddTokens,
   LockedDeposit,
   Withdrawal,
   RewardsCredited,
@@ -97,7 +97,7 @@ export enum AccountHistoryItemType {
 }
 
 const AccountHistoryAction = {
-  Deposit: () => ({ type: AccountHistoryItemType.Deposit as const }),
+  AddTokens: () => ({ type: AccountHistoryItemType.AddTokens as const }),
   LockedDeposit: (unlockDate: Date) => ({
     type: AccountHistoryItemType.LockedDeposit as const,
     unlockDate,
@@ -506,7 +506,7 @@ const MOCK_DATA: Record<string, Data> = {
 const mkMockHistory = (): AccountHistory => [
   {
     timestamp: new Date("2024-06-10T00:00:00Z"),
-    action: AccountHistoryAction.Deposit(),
+    action: AccountHistoryAction.AddTokens(),
     amount: 2_000_000n,
     accountTotal: 2_000_000n,
     availableRewards: 0n,

+ 2 - 2
apps/staking/src/components/AccountHistory/index.tsx

@@ -87,8 +87,8 @@ const mkDescription = (action: AccountHistoryAction): string => {
     case AccountHistoryItemType.Claim: {
       return "Rewards claimed";
     }
-    case AccountHistoryItemType.Deposit: {
-      return "Tokens deposited";
+    case AccountHistoryItemType.AddTokens: {
+      return "Tokens added";
     }
     case AccountHistoryItemType.LockedDeposit: {
       return `Locked tokens deposited, unlocking ${action.unlockDate.toLocaleString()}`;

+ 1 - 1
apps/staking/src/components/AccountSummary/index.tsx

@@ -68,7 +68,7 @@ export const AccountSummary = ({
         <div className="mt-8 flex flex-row items-center gap-4">
           <TransferButton
             actionDescription="Add funds to your balance"
-            actionName="Deposit"
+            actionName="Add Tokens"
             max={walletAmount}
             transfer={deposit}
           />