Skip to content

Commit

Permalink
feat: more info for inconsistent ledger versions (#1640)
Browse files Browse the repository at this point in the history
Co-authored-by: TingALin <[email protected]>
  • Loading branch information
Ross Bulat and TingALin authored Nov 14, 2023
1 parent 56314ae commit cb17371
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/config/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const HelpConfig: HelpItems = [
'Ledger Rejected Transaction',
'Ledger Request Timeout',
'Open App On Ledger',
'Ledger App Not on Latest Runtime Version',
'Wrong Transaction',
],
external: [],
Expand Down
9 changes: 8 additions & 1 deletion src/library/SubmitTx/ManualSign/Ledger/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ export const Ledger = ({
{runtimesInconsistent && (
<div className="inner warning">
<div>
<p className="prompt">{t('ledgerDeviceOutOfDate', { appName })}</p>
<p className="prompt">
{t('ledgerAppOutOfDate', { appName })}
<ButtonHelp
onClick={() =>
openHelp('Ledger App Not on Latest Runtime Version')
}
/>
</p>
</div>
</div>
)}
Expand Down
8 changes: 8 additions & 0 deletions src/locale/cn/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@
"得到的收益金额取决于提名人和验证人自己在那个Era绑定了多少{NETWORK_UNIT}."
]
],
"ledgerAppNotOnLatestRuntimeVersion": [
"Ledger App非最新运行时版本",
[
"当您的Ledger应用程序未配置为最新的运行时元数据时,会出现此消息. 您仍然可以尝试提交您的交易,但可能会失败",
"若要防止此警告,请将您的Ledger设备更新为最新版本",
"运行时升级部署和Ledger应用程序更新之间通常会有延迟。当应用程序更新可用时, 您将能够在Ledger Live中更新应用程序"
]
],
"ledgerHardwareWallets": [
"Ledger硬件钱包",
[
Expand Down
2 changes: 1 addition & 1 deletion src/locale/cn/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
"insertPayoutAddress": "输入收益到账地址",
"invalid": "地址无效",
"join": "加入提名池",
"ledgerAppOutOfDate": "您的{{appName}} Ledger应用程序未配置为最新运行时版本",
"ledgerConnectAndConfirm": "连接您的Ledger设备并确认其已被连接",
"ledgerDeviceOutOfDate": "Ledger设备上的{{appName}}应用程序未配置为最新的运行时元数据, 您的交易可能会失败。请将您的Ledger设备更新到最新版本以防止出现此警告",
"legalDisclosures": "法律论述",
"listItemActive": "活跃",
"locked": "己锁",
Expand Down
8 changes: 8 additions & 0 deletions src/locale/en/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@
"The payout amounts received depend on how much {NETWORK_UNIT} the nominators, and validators themselves, had bonded for that era."
]
],
"ledgerAppNotOnLatestRuntimeVersion": [
"Ledger App Not on Latest Runtime Version",
[
"This message occurs when your Ledger app is not configured to the latest runtime metadata. You may still attempt to submit your transaction, but it may fail.",
"To prevent this warning, update your Ledger device to the latest version.",
"There is usually a delay between runtime upgrades deploying and Ledger app updates. When an app update is available, you will be able to update your app in Ledger Live."
]
],
"ledgerHardwareWallets": [
"Ledger Hardware Wallets",
[
Expand Down
2 changes: 1 addition & 1 deletion src/locale/en/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"insertPayoutAddress": "Insert a payout address",
"invalid": "Address Invalid",
"join": "Join",
"ledgerAppOutOfDate": "Your {{appName}} Ledger app is not configured to the latest runtime version",
"ledgerConnectAndConfirm": "Connect your Ledger device and confirm it is connected.",
"ledgerDeviceOutOfDate": "The {{appName}} app on your Ledger device is not configured to the latest runtime metadata, and your transaction may fail. Update your Ledger device to the latest version to prevent this warning.",
"legalDisclosures": "Legal Disclosures",
"listItemActive": "Active",
"locked": "Locked",
Expand Down

0 comments on commit cb17371

Please sign in to comment.