Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
19 KiB
@thirdweb-dev/react-native
0.2.0
Minor Changes
-
#584
d01b135dThanks @MananTank! - [Wallets, RN, React, ReactCore] New Wallets SDK implementationBreaking changes:
React and React Native
- Replaced
walletConnectorswithsupportedWalletsin the ThirdwebProvider.
import { coinbaseWallet, metamaskWallet, ThirdwebProvider } from "@thirdweb-dev/react"; const App = () => { - return <ThirdwebProvider walletConnectors={["metamask", "coinbaseWallet"]}>{...}</ThirdwebProvider> + return <ThirdwebProvider supportedWallets={[metamaskWallet(), coinbaseWallet()]}>{...}</ThirdwebProvider> }-
magicLinkConnectornot yet implemented in this version -
Removed
desiredChainId, useactiveChaininstead -
DAppMetaDatatype now requires theurlfield to be passed in -
Removed
chainRpcprop from the ThirdwebProvider. You can pass custom rpcs in the Chain object through theactiveChainandsupportedChainsprops. -
Replaced the
useNetworkhook foruseChainanduseSwitchChain -
Updated
ConnectWalletbutton in React:
- Removed
accentColorandcolorMode - Added a
themeprop withdarkandlightvalues
- Updated the
Web3Buttonbutton in React:
- Removed
accentColorandcolorMode - Added a
themeprop withdarkandlightvalues
Patch Changes
- You can now pass a
themeprop to the ThirdwebProvider. Values arelightanddark
import { ThirdwebProvider } from "@thirdweb-dev/react"; const App = () => { return <ThirdwebProvider theme='light'>{...}</ThirdwebProvider> }-
New wallet hooks added
- useWallet()
- useConenct()
- useConnectionStatus()
- useSwitchChain()
-
Removed
wagmidependency from thereact-native-compatpackage and updated shims -
New
ConnectWalletandWeb3Buttoncomponents in React Native -
New wallets package with support for the most common wallets. MetaMask, Coinbase, WalletConnect V1 and V2 and PaperWallet
-
Added
autoSwitchprop to the ThirdwebProvider to control whether or not to automatically switch to wallet's network to active chain
import { ThirdwebProvider } from "@thirdweb-dev/react"; const App = () => { return <ThirdwebProvider autoSwitch>{...}</ThirdwebProvider> } - Replaced
-
#584
d01b135dThanks @MananTank! - [Wallets] New and updated wallets. [RN] UI Components and Wallets support.
Patch Changes
-
#757
9ea43969Thanks @iketw! - switch tothirdwebcdn.comfor default IPFS gateway -
#813
b97cf2e5Thanks @iketw! - [ReactNative] Fix react-native-modal ios flicker -
#825
4bdeefe6Thanks @iketw! - [Core,React,RN,Wallets] Allow for wallets to be created without props where possibleYou can now create wallets without having to worry about it's params. We provide sensible defaults.
const w = new WalletConnectV1(); w.connect(); const w1 = new WalletConnect(); w1.connect(); const cb = new CoinbaseWallet() w1.connect(); const safe = new SafeWallet(); const device = new DeviceBrowserWallet(); -
#771
e3161e59Thanks @iketw! - [ReactNativeSDK] Use wallet metadata from the wallet class -
#800
d6ae520aThanks @iketw! - [ReactCore/RN] Fix useActiveChain hook -
#735
ba9f593bThanks @jnsdls! -New Hooks
useWatchTransactions()- watch for transactions on the blockchain (real-time)
Example: Listen to all transactions on USD Coin (USDC) contract address.
import { useWatchTransactions } from "@thirdweb-dev/react"; const MyComponent = () => { const transactions = useWatchTransactions({ network: "ethereum", contractAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", }); if (!transactions.length) { return <div>No transactions, yet.</div>; } return ( <div> {transactions.map((transaction) => ( <div key={transaction.hash}> <div>Hash: {transaction.hash}</div> <div>From: {transaction.from}</div> <div>To: {transaction.to}</div> <div>Value: {transaction.value}</div> </div> ))} </div> ); };Note
This hook is available in
@thirdweb-dev/react,@thirdweb-dev/react-nativeand@thirdweb-dev/react-corepackages, the usage is the same. (The only difference is the import path.) -
#807
79768d4cThanks @iketw! - [ReactNative] Updated code comments for supportedWallets -
Updated dependencies [
d01b135d,6e9b9dba,93eca1de,a6fce0f6,9ea43969,3ff8eecf,2ec28021,4bdeefe6,805896c7,b56511e2,8ef5a6f2,4cbbad98,e3161e59,d6ae520a,5f0493d0,71532e5a,33d1cc7f,de7b6196,6b145d4b,83e99dbf,1baed0b1,52d37f01,485abd06,95bcfa6d,682f1c67,4d07b4b4,4d5fdda9,d8c1c943,08507611,e2ec70c4,ba9f593b,6b31a9bc,04775954,4b77bc9b,d01b135d,1baed0b1,8463a176,e47ceafe,4d5fdda9,6c0c6538,208d97e6,ddc1c33a,49eceaa0,5c7c0923,ba9f593b,2221f97d,9fa628f8,5c7c0923,abf609a4,9a4a542c,b2d0ffb0,bd40bc2e]:- @thirdweb-dev/[email protected].0
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected].4
- @thirdweb-dev/[email protected]
0.1.9
Patch Changes
- Updated dependencies [
713d3187]:
0.1.8
Patch Changes
0.1.7
Patch Changes
0.1.6
Patch Changes
-
#665
6ef52dc9Thanks @shift4id! - Fix spelling throughout all packages -
Updated dependencies [
a7e908b5,61ef6964,2f4cd928,6ae39277,8a8a37f6,8f46a2ee,8d5b418e,63f552d7,fb346ffd,e081075b,7832041c,d8dec9fc,478780f6,b83ea525,541dfeea,6ef52dc9,0c883044,85250cf7,2676fc01,0666f37c,85250cf7,e33bd2a8,b80024c6,8845bf96,2335f000,696c384a,4355518a,3740a0bf,cc7ce8b1,91f5a2fd,23cd88ec,87a101ad,537785fe,29c1cf7e,b6b0855b,2a8cc289,1e1a3912,dc08aa73,bd6be0ba]:- @thirdweb-dev/[email protected].0
- @thirdweb-dev/[email protected].0
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
0.1.5
Patch Changes
- Updated dependencies [
d7deaa4,b7a5b45]:- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
0.1.4
Patch Changes
- Updated dependencies [
a3472a1,5712650,5712650]:- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
0.1.3
Patch Changes
- Updated dependencies [
3d644fb]:- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
0.1.2
Patch Changes
-
Updated dependencies [
f3408d0,66cf1fb]:- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
0.1.1
Patch Changes
- Updated dependencies [
f0de81d,300fe4a,f580b8a]:- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]