Skip to content

Commit

Permalink
Merge branch 'RabbyHub:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jagadbumi1000 authored Jan 5, 2025
2 parents 715df71 + 5fb19e5 commit 3ea530d
Show file tree
Hide file tree
Showing 49 changed files with 1,866 additions and 362 deletions.
63 changes: 59 additions & 4 deletions _raw/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@
"process-with-two-step-approve": "Proceed with two step approve",
"fetch-best-quote": "Fetching the Best quote",
"usd-after-fees": "≈ {{usd}} ",
"no-fees-for-wrap": "No Rabby fees for Wrap",
"no-fees-for-wrap": "No Rabby fee for Wrap",
"No-available-quote": "No available quote",
"price-impact": "Price Impact",
"loss-tips": "You're losing {{usd}}. Try a smaller amount in a small market.",
Expand Down Expand Up @@ -1741,7 +1741,10 @@
"required": "Enter the Password to Unlock",
"placeholder": "Enter the Password to Unlock",
"error": "incorrect password"
}
},
"title": "Rabby Wallet",
"description": "The game-changing wallet for Ethereum and all EVM chains",
"btnForgotPassword": "Forgot Password?"
},
"addToken": {
"noTokenFound": "No token found",
Expand Down Expand Up @@ -2276,6 +2279,7 @@
"title": "GasAccount",
"deposit": "Deposit",
"withdraw": "Withdraw",
"noBalance": "No balance",
"gasExceed": "GasAccount balance cannot exceed $1000",
"risk": "Your current address has been detected as risky, so this feature is unavailable.",
"logout": "Log out current GasAccount",
Expand All @@ -2294,21 +2298,33 @@
},
"logoutConfirmModal": {
"title": "Log out current GasAccount",
"desc": "Once logged out, you will no longer be able to use GasAccount to pay for gas fees.",
"desc": "Logging out disables GasAccount. You can restore your GasAccount by logging in with this address.",
"logout": "Log out"
},
"depositPopup": {
"title": "Deposit",
"desc": "Make a deposit to Rabby's DeBank L2 Account with no extra fees—withdraw anytime.",
"invalidAmount": "Must be under 500",
"amount": "Amount",
"token": "Token",
"selectToken": "Select Token to Deposit"
},
"withdrawPopup": {
"noEnoughValuetBalance": "Vault Balance insufficient. Switch chain or try again later.",
"noEnoughGas":"Amount too low to cover gas fees",
"riskMessageFromChain": "Due to risk control, the withdrawal limit depends on the total amount deposited from this chain.",
"riskMessageFromAddress": "Due to risk control, the withdrawal limit depends on the total amount this address has deposited",
"selectDestinationChain":"Select destination chain",
"selectRecipientAddress": "Select recipient address",
"withdrawalLimit": "Withdrawal limit",
"title": "Withdraw",
"desc": "You can withdraw your GasAccount balance to your DeBank L2 Wallet. Log in to your DeBank L2 Wallet to transfer the funds to a supported blockchain as needed.",
"amount": "Amount",
"to": "To"
"to": "To",
"selectChain": "Select Chain",
"recipientAddress": "Recipient address",
"destinationChain": "Destination chain",
"deductGasFees": "Received amount will deduct gas fees"
},
"withdrawConfirmModal": {
"title": "Transferred to your DeBank L2 Wallet",
Expand Down Expand Up @@ -2438,6 +2454,45 @@
"placeholder": "Input safe address",
"loading": "Searching the deployed chain of this address"
}
},
"forgotPassword": {
"home": {
"title": "Forgot Password",
"description": "Rabby Wallet doesn't store your password and can't help you retrieve it. Reset your wallet to set up a new one.",
"button": "Begin Reset Process",
"descriptionNoData": "Rabby Wallet doesn't store your password and can't help you retrieve it. Set a new password if you forgot",
"buttonNoData": "Set Password"
},
"reset": {
"title": "Reset Rabby Wallet",
"button": "Confirm Reset",
"alert": {
"title": "Data will be deleted and unrecoverable:",
"seed": "Seed Phrase",
"privateKey": "Private Key"
},
"tip": {
"title": "Data will be kept:",
"hardware": "Imported Hardware Wallets",
"whitelist": "Whitelist Settings",
"records": "Signature Records",
"safe": "Imported Safe Wallets",
"watch": "Contacts and Watch-Only Addresses"
},
"confirm": "Type <1>RESET</1> in the box to confirm and proceed"
},
"tip": {
"title": "Rabby Wallet Reset Completed",
"description": "Create a new password to continue",
"button": "Set Password",
"descriptionNoData": "Add your address to get started",
"buttonNoData": "Add Address"
},
"success": {
"title": "Password Successfully Set",
"description": "You're all set to use Rabby Wallet",
"button": "Done"
}
}
},
"component": {
Expand Down
42 changes: 41 additions & 1 deletion _raw/locales/zh-CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,8 @@
"error": "密码错误",
"placeholder": "输入密码解锁",
"required": "输入密码解锁"
}
},
"btnForgotPassword": "忘记密码?"
},
"addressDetail": {
"add-to-whitelist": "添加到白名单",
Expand Down Expand Up @@ -2038,6 +2039,45 @@
},
"sign": {
"transactionSpeed": "交易速度"
},
"forgotPassword": {
"home": {
"buttonNoData": "设置新密码",
"button": "开始重置流程",
"title": "忘记密码",
"description": "Rabby不会保存你的密码,因此丢失密码无法找回 如果忘记密码只能重置钱包并重新设置密码",
"descriptionNoData": "Rabby不会保存你的密码,因此丢失密码无法找回 如果忘记密码只能重新设置密码"
},
"reset": {
"title": "重置 Rabby Wallet",
"alert": {
"title": "重置后会清除以下数据,且无法帮你找回",
"seed": "助记词",
"privateKey": "私钥"
},
"tip": {
"title": "会保留以下数据",
"hardware": "已导入的硬件钱包地址",
"safe": "已导入的 Safe 地址",
"watch": "已导入的观察地址",
"whitelist": "转账白名单",
"records": "签名记录"
},
"confirm": "如确认重置钱包, 请输入: <1>RESET</1>",
"button": "确认重置"
},
"success": {
"title": "密码创建成功",
"description": "请继续使用 Rabby",
"button": "完成"
},
"tip": {
"title": "Rabby Wallet 已经重置",
"button": "设置新密码",
"buttonNoData": "重新导入地址",
"description": "请设定一个新的密码继续使用钱包",
"descriptionNoData": "请重新导入地址后使用钱包"
}
}
},
"component": {
Expand Down
2 changes: 2 additions & 0 deletions changeLogs/0938.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added support for resetting password
- Optimized withdrawal process for GasAccount
2 changes: 2 additions & 0 deletions changeLogs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ import version0933 from './0933.md';
import version0935 from './0935.md';
import version0936 from './0936.md';
import version0937 from './0937.md';
import version0938 from './0938.md';

const version = process.env.release || '0';
const versionMap = {
Expand Down Expand Up @@ -204,6 +205,7 @@ const versionMap = {
'0.93.5': version0935,
'0.93.6': version0936,
'0.93.7': version0937,
'0.93.8': version0938,
};
export const getUpdateContent = () => {
return versionMap[version];
Expand Down
2 changes: 2 additions & 0 deletions changeLogs/zh-CN/0938.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- 支持重置密码
- 优化 GasAccount 提现流程
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rabby",
"version": "0.93.7",
"version": "0.93.8",
"description": "A browser plugin for DeFi users",
"scripts": {
"clean": "node build/clean.js",
Expand Down Expand Up @@ -63,7 +63,7 @@
"@rabby-wallet/gnosis-sdk": "1.3.10",
"@rabby-wallet/page-provider": "0.4.2",
"@rabby-wallet/rabby-action": "0.1.8",
"@rabby-wallet/rabby-api": "0.9.7",
"@rabby-wallet/rabby-api": "0.9.9",
"@rabby-wallet/rabby-security-engine": "2.0.7",
"@rabby-wallet/rabby-swap": "0.0.45",
"@rabby-wallet/widgets": "1.0.9",
Expand Down
17 changes: 17 additions & 0 deletions src/background/controller/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4980,6 +4980,23 @@ export class WalletController extends BaseController {
tx,
});
};

savedUnencryptedKeyringData = async () =>
keyringService.savedUnencryptedKeyringData();

hasEncryptedKeyringData = async () =>
keyringService.hasEncryptedKeyringData();

hasUnencryptedKeyringData = async () =>
keyringService.hasUnencryptedKeyringData();

resetPassword = async (password: string) =>
keyringService.resetPassword(password);

resetBooted = async () => keyringService.resetBooted();

getUnencryptedKeyringTypes = async () =>
keyringService.getUnencryptedKeyringTypes();
}

const wallet = new WalletController();
Expand Down
14 changes: 14 additions & 0 deletions src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,20 @@ restoreAppState();
);
}

keyringService.on('resetPassword', async () => {
const gasAccount = gasAccountService.getGasAccountData() as GasAccountServiceStore;

if (
gasAccount?.account?.type === KEYRING_TYPE.SimpleKeyring ||
gasAccount?.account?.type === KEYRING_TYPE.HdKeyring
) {
gasAccountService.setGasAccountSig();
eventBus.emit(EVENTS.broadcastToUI, {
method: EVENTS.GAS_ACCOUNT.LOG_OUT,
});
}
});

// for page provider
browser.runtime.onConnect.addListener((port) => {
if (
Expand Down
Loading

0 comments on commit 3ea530d

Please sign in to comment.