-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/npm_and_yarn/packages/caravan-wal…
…lets/axios-1.7.4
- Loading branch information
Showing
64 changed files
with
7,360 additions
and
314 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
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
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
39 changes: 39 additions & 0 deletions
39
apps/coordinator/src/components/RegisterWallet/RegisterBitBoxButton.jsx
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,39 @@ | ||
import React, { useState } from "react"; | ||
import { Button } from "@mui/material"; | ||
import { useDispatch, useSelector } from "react-redux"; | ||
import { BITBOX, RegisterWalletPolicy } from "@caravan/wallets"; | ||
import { getWalletConfig } from "../../selectors/wallet"; | ||
import { setErrorNotification } from "../../actions/errorNotificationActions"; | ||
|
||
const RegisterBitBoxButton = ({ ...otherProps }) => { | ||
const [isActive, setIsActive] = useState(false); | ||
const walletConfig = useSelector(getWalletConfig); | ||
const dispatch = useDispatch(); | ||
|
||
const registerWallet = async () => { | ||
setIsActive(true); | ||
try { | ||
const interaction = new RegisterWalletPolicy({ | ||
keystore: BITBOX, | ||
...walletConfig, | ||
}); | ||
await interaction.run(); | ||
} catch (e) { | ||
dispatch(setErrorNotification(e.message)); | ||
} finally { | ||
setIsActive(false); | ||
} | ||
}; | ||
return ( | ||
<Button | ||
variant="outlined" | ||
onClick={registerWallet} | ||
disabled={isActive} | ||
{...otherProps} | ||
> | ||
Register w/ BitBox | ||
</Button> | ||
); | ||
}; | ||
|
||
export default RegisterBitBoxButton; |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import DownloadColdardConfigButton from "./DownloadColdcardConfig"; | ||
import PolicyRegistrationTable from "./PolicyRegistrationsTable"; | ||
import RegisterBitBoxButton from "./RegisterBitBoxButton"; | ||
import RegisterLedgerButton from "./RegisterLedgerButton"; | ||
|
||
export { | ||
DownloadColdardConfigButton, | ||
PolicyRegistrationTable, | ||
RegisterBitBoxButton, | ||
RegisterLedgerButton, | ||
}; |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { BITBOX } from "@caravan/wallets"; | ||
|
||
import publicKeyTests from "./publicKeys"; | ||
import extendedPublicKeyTests from "./extendedPublicKeys"; | ||
import { signingTests } from "./signing"; | ||
import addressTests from "./addresses"; | ||
import registrationTests from "./registration"; | ||
|
||
export default publicKeyTests(BITBOX) | ||
.concat(extendedPublicKeyTests(BITBOX)) | ||
.concat(signingTests(BITBOX)) | ||
.concat(addressTests(BITBOX)) | ||
.concat(registrationTests(BITBOX)); |
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
Oops, something went wrong.