-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade react-kit version (#1086)
Co-authored-by: Ludovic Levalleux <[email protected]>
- Loading branch information
1 parent
394a9df
commit 826f7e8
Showing
9 changed files
with
125 additions
and
58 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,14 +1,51 @@ | ||
import { CommitWidgetReduxUpdaters, hooks } from "@bosonprotocol/react-kit"; | ||
import { useProvider } from "lib/utils/hooks/connection/connection"; | ||
import { | ||
CommitWidgetReduxUpdaters, | ||
ConfigProvider, | ||
hooks | ||
} from "@bosonprotocol/react-kit"; | ||
import { useConfigContext } from "components/config/ConfigContext"; | ||
import { CONFIG } from "lib/config"; | ||
import { | ||
useAccount, | ||
useChainId, | ||
useProvider, | ||
useSigner | ||
} from "lib/utils/hooks/connection/connection"; | ||
import React from "react"; | ||
|
||
export const CoreComponentsUpdaters: React.FC = () => { | ||
const provider = useProvider(); | ||
const isWindowVisible = hooks.useIsWindowVisible(); | ||
const { config } = useConfigContext(); | ||
const connectedChainId = useChainId(); | ||
const { account } = useAccount(); | ||
const signer = useSigner(); | ||
return ( | ||
<CommitWidgetReduxUpdaters | ||
isWindowVisible={isWindowVisible} | ||
provider={provider} | ||
/> | ||
<ConfigProvider | ||
{...{ | ||
...CONFIG, | ||
envName: config.envName, | ||
configId: config.envConfig.configId, | ||
withWeb3React: false, | ||
withCustomReduxContext: false, | ||
defaultCurrencySymbol: CONFIG.defaultCurrency.symbol, | ||
defaultCurrencyTicker: CONFIG.defaultCurrency.ticker, | ||
licenseTemplate: CONFIG.rNFTLicenseTemplate, | ||
minimumDisputeResolutionPeriodDays: CONFIG.minimumDisputePeriodInDays, | ||
walletConnectProjectId: CONFIG.walletConnect.projectId, | ||
ipfsProjectId: CONFIG.infuraProjectId, | ||
ipfsProjectSecret: CONFIG.infuraProjectSecret, | ||
withExternalConnectionProps: true, | ||
externalConnectedChainId: connectedChainId, | ||
externalConnectedAccount: account, | ||
externalConnectedSigner: signer | ||
}} | ||
> | ||
<CommitWidgetReduxUpdaters | ||
isWindowVisible={isWindowVisible} | ||
provider={provider} | ||
withWeb3React={false} | ||
/> | ||
</ConfigProvider> | ||
); | ||
}; |
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
Oops, something went wrong.