()
| 5 | entryScriptWeb3: null, |
| 6 | // Cache InpageBridgeWeb3 so that it is immediately available |
| 7 | async init() { |
| 8 | this.entryScriptWeb3 = Device.isIos() |
| 9 | ? await RNFS.readFile( |
| 10 | `${RNFS.MainBundlePath}/InpageBridgeWeb3.js`, |
| 11 | 'utf8', |
| 12 | ) |
| 13 | : await RNFS.readFileAssets(`InpageBridgeWeb3.js`); |
| 14 | |
| 15 | return this.entryScriptWeb3; |
| 16 | }, |
| 17 | async get() { |
| 18 | // Return from cache |
| 19 | if (this.entryScriptWeb3) return this.entryScriptWeb3; |