forked from LedgerHQ/ledger-live
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95d2a5d
commit b1414f1
Showing
16 changed files
with
1,811 additions
and
15 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
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
7 changes: 7 additions & 0 deletions
7
.../ledger-live-desktop/src/renderer/families/mimblewimble_coin/ReceiveStepConnectDevice.tsx
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,7 @@ | ||
const StepConnectDeviceFooter = () => { | ||
return null; | ||
}; | ||
|
||
export default { | ||
StepConnectDeviceFooter, | ||
}; |
46 changes: 46 additions & 0 deletions
46
apps/ledger-live-desktop/src/renderer/families/mimblewimble_coin/SendRecipientFields.tsx
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,46 @@ | ||
import React, { useCallback } from "react"; | ||
import { Trans } from "react-i18next"; | ||
import { getAccountBridge } from "@ledgerhq/live-common/bridge/index"; | ||
import { Account } from "@ledgerhq/types-live"; | ||
import { | ||
Transaction, | ||
TransactionStatus, | ||
} from "@ledgerhq/live-common/families/mimblewimble_coin/types"; | ||
import Box from "~/renderer/components/Box"; | ||
import Label from "~/renderer/components/Label"; | ||
import Switch from "~/renderer/components/Switch"; | ||
|
||
type Props = { | ||
account: Account; | ||
transaction: Transaction; | ||
status: TransactionStatus; | ||
onChange: (t: Transaction) => void; | ||
}; | ||
|
||
const SendRecipientFields = (props: Props) => { | ||
const { account, transaction, onChange } = props; | ||
const onChangeSendAsFile = useCallback( | ||
(sendAsFile: boolean) => { | ||
const bridge = getAccountBridge(account); | ||
onChange( | ||
bridge.updateTransaction(transaction, { | ||
sendAsFile, | ||
}), | ||
); | ||
}, | ||
[account, onChange, transaction], | ||
); | ||
return ( | ||
<Box flow={1} horizontal alignItems="center"> | ||
<Label mr={2}> | ||
<Trans i18nKey="families.mimblewimble_coin.sendAsFile" /> | ||
</Label> | ||
<Switch isChecked={transaction.sendAsFile} onChange={onChangeSendAsFile} /> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default { | ||
component: SendRecipientFields, | ||
fields: ["sendAsFile"], | ||
}; |
Oops, something went wrong.