This repository has been archived by the owner on Jun 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add jetbrains folder * add jetbrains to gitignore file * add check to avoid exception on objects inside extra field * add transaction confirm fields for filecoin * remove duplicated line * fix error on line
- Loading branch information
1 parent
b7373e8
commit 22a5616
Showing
4 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,4 +128,5 @@ ui-lib/lib | |
ui-lib/storybook-static/* | ||
|
||
# IDE | ||
.vscode/* | ||
.vscode/* | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,5 @@ setSupportedCurrencies([ | |
"ethereum_ropsten", | ||
"ethereum_goerli", | ||
"cosmos_testnet", | ||
"filecoin", | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/renderer/families/filecoin/TransactionConfirmFields.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// @flow | ||
|
||
import invariant from "invariant"; | ||
import React from "react"; | ||
import TransactionConfirmField from "~/renderer/components/TransactionConfirm/TransactionConfirmField"; | ||
import Text from "~/renderer/components/Text"; | ||
import { DeviceTransactionField } from "@ledgerhq/live-common/lib/transaction"; | ||
|
||
|
||
const addressStyle = { | ||
wordBreak: "break-all", | ||
textAlign: "right", | ||
maxWidth: "70%", | ||
}; | ||
|
||
const FilecoinField = ({ transaction, field }: { transaction: Transaction, field: DeviceTransactionField }) => { | ||
invariant(transaction.family === "filecoin", "filecoin transaction"); | ||
|
||
return ( | ||
<TransactionConfirmField label={field.label}> | ||
<Text style={addressStyle} ml={1} ff="Inter|Medium" color="palette.text.shade80" fontSize={3}> | ||
{field.value} | ||
</Text> | ||
</TransactionConfirmField> | ||
); | ||
}; | ||
|
||
const fieldComponents = { | ||
"filecoin.gasFeeCap": FilecoinField, | ||
"filecoin.gasPremium": FilecoinField, | ||
"filecoin.gasLimit": FilecoinField, | ||
"filecoin.method": FilecoinField, | ||
}; | ||
|
||
export default { | ||
fieldComponents, | ||
}; |