Metamask: Portle configuration of configuration with reactive application
In this article, we wel exam to configure the Metamask portfolio in the native React application using Wallet configure. We will focus on integrating it with the EXPO or XCOD mobile application.
What is Wallet concert?
Wallecontect is an open source protocol seres to send and reception cryptocurrency without without witting to downloading sunllets. It is trouble -free veins of DAPP (decentralized applications) and portfolio suppliers of Metamask is safe and scalable way.
preliminary requirements
To use purple contemporary metamask, you do you donated:
- Metamask wallet
- Expo or Xcode
- Native climate react installed
* Step 1: Confirmation of the portfolio configuration *
Create a new file called ‘Metamask.json in the project catalolog:
`s Json
{
"wallet": {
"ID": "yur_memask,
"Specretkey": "yur_memask_skret_eye"
}
}
Refer to Your_Metamask and Your_Memaskness' and Youramask yomaskey' The act of the actress and secret keys of the metamask portrait.
Step 2: Create a new Native Exp React project or XCODE application
Ifly use an exo, run:
Bash
Experience Intental
Otherwise, create an XCODE project (or use the iOD equivalent) with the following settings:
- File - File - Project …
- Select Select Select Native and select application
- Set the name of your application to "Memask Wallet"
Step 3: Configure Metamask in your React Native Expoc application
Open the "Metamask.json file in the project katalog and add the following code:
s Json
Import {initialize} with "Meatmask-Wallet";
exitate ({{ eg
Valletid: "yur_memask",
Secretkey: "yur_memask_seet_eye"
^)
Step 4: Integrated Wallet contest
Infected React Native Expocation, add the following code to gardening Walletcontect:
Jsx
Import {UselletCannectject} with “Cetamask-Conthance/Reacter/React-native”;
const app = () => {
const {actual, consection, error} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =.
ID: “yur_memassak”,
Secretkey: “yur_memask_seet_eye”
^)
ifer) {
console.err (errorr);
Null return;
}
// Changes in the portfolio
constinent concreation = async () => {
condo.log (“Contalle portfolio with”);
^
return (
{actual & & (
)}
),
^
Step 5: Show Qrcode Modal (optation)
Ilf with to show Modal Qrcode off starating the application, add the following code:
` Jsx
Import {UselletCannectject} with “Cetamask-Conthance/Reacter/React-native”;
const app = () => {
const {actual, consection, error} = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =.
ID: “yur_memassak”,
Secretkey: “yur_memask_seet_eye”
^)
ifer) {
console.err (errorr);
Null return;
}
// Show Qrcode Modalwest.
const shows = () => {
Connection.request ( {Cont});
^
return (
{actual & & (
)}
),
^
That’s all! You nevere a Metamask wallet in your React Native Expe is applicable to use Portletconnect. After staring, QRCODEMALAL wille appearance, enlimous to connect your wallet.