Comments (10)
@ignaciosantise i tested with safe pal and send transaction method actually did work with no probelm !
so the issue is from trust wallet side
from web3modal-react-native.
@itsnyx yes, lets wait until their next release. Hope it is solved. As it's not an issue with this SDK, im closing this and i'll post updates in #22
from web3modal-react-native.
@itsnyx @arein @chris13524 @0xasimetriq I tried this library in react native cli project, It's working fine if i didn't use the navigation. But throwing error initialization provider with the navigation.
from web3modal-react-native.
@arslanrazzaq feel free to open a new issue with all the related info, screenshots and and example repo to reproduce the bug.
from web3modal-react-native.
@itsnyx which wallet are you using?
from web3modal-react-native.
@ignaciosantise i only tested trust wallet both via qr code and also from installed wallets method.
other functions such as signing message or transaction works fine
from web3modal-react-native.
@itsnyx can you test with another wallet? Trust Wallet has some issues that'll be solved in their next release.
Context: #22
from web3modal-react-native.
Btw Omni wallet, also don't work on iOS using the React Native project. Trustwallet and Zerion don't work on Android.
from web3modal-react-native.
@ignaciosantise i dont know this information helps or not but before using web3modal i was using this libraries directly inside app:
"@walletconnect/react-native-compat": "^2.4.0",
"@walletconnect/universal-provider": "^2.4.0",
and i did dependancy update to the following:
"@walletconnect/react-native-compat": "^2.5.1",
"@walletconnect/universal-provider": "^2.5.1",
and after this update i could not do any blockchain actions !
it would not show up inside wallet apps!
and after this i downgraded to the old versions and started working
if you are using these libraries inside web3 modal library , maybe this is the issue !
from web3modal-react-native.
hello, @ignaciosantise .
i found a solution for sending transaction in trust wallet in its current state :
export const handleSendTransaction = async (
amount,
destination,
setWaiting,
web3Provider,
) => {
try {
if (!web3Provider) {
Toast.show({
type: 'info',
text1: t('main:connect_wallet'),
text2: t('main:connect_wallet_info'),
});
return;
}
const {chainId} = await web3Provider.getNetwork();
const [address] = await web3Provider.listAccounts();
const balance = await web3Provider.getBalance(address);
const tx = await formatTestTransaction(
'eip155:' +
chainId +
':' +
address +
':' +
destination +
':' +
Web3.utils.numberToHex(Web3.utils.toWei(amount, 'ether')),
);
if (balance.lt(BigNumber.from(tx.gasPrice).mul(tx.gasLimit))) {
Toast.show({
type: 'error',
text1: t('main:insufficient_balance'),
text2: t('main:insufficient_balance_info'),
});
return {
method: 'eth_sendTransaction',
address,
valid: false,
result: 'Insufficient funds for intrinsic transaction cost',
};
}
Toast.show({
type: 'info',
text1: t('main:confirm_purchase'),
text2: t('main:confirm_purchase_info'),
});
setWaiting(true);
const txHash = await web3Provider.send('eth_sendTransaction', [tx]);
return {
method: 'eth_sendTransaction',
address,
valid: true,
result: txHash,
};
} catch (err) {
console.log('err', err);
}
};
this method works with trust wallet
from web3modal-react-native.
Related Issues (20)
- [feature] Upgrade @web3modal/core-react-native to valtio 1.11.2 HOT 3
- [bug] Inability to execute write calls to contracts on React Native HOT 7
- [bug]: Can't find variable React HOT 5
- [feature] wagmi, viem v2 support HOT 10
- [bug]: this.events.off is not a function HOT 11
- [bug]: After approve/reject request in wallet don't redirect back on dapp on iOs 17+ HOT 1
- [bug]: New architecture support HOT 5
- [feature] Implement Analytics core
- [chore] Release alpha version of Analytics
- [feature] Send basic events to API
- Send Basic Events to API HOT 1
- Implement Analytics Core HOT 1
- Alpha Testing Bug fixes
- BETA | Update documentation
- [bug] IOS Crashes When Using this package with Webview HOT 7
- [bug]: Transaction process fails while staying in the wallet app HOT 5
- [bug]: Metamask chainId error HOT 1
- [bug]: Can't connect to wallet like SafePal, Trust Wallet... HOT 6
- [feature] Getting connected wallet metadata HOT 2
- [feature] Support `eth_signTypedData_v4` RPC method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web3modal-react-native.