mirror of
https://github.com/Instadapp/assembly.git
synced 2024-07-29 22:37:06 +00:00
Add Gnosis
This commit is contained in:
parent
4da2951383
commit
aa96c61531
|
@ -1,9 +1,9 @@
|
|||
import { computed, onMounted, ref, watch } from "@nuxtjs/composition-api";
|
||||
import Web3 from "web3";
|
||||
import Web3Modal from "web3modal";
|
||||
import { SafeAppWeb3Modal } from '@gnosis.pm/safe-apps-web3modal'
|
||||
import { Network } from "./useNetwork";
|
||||
|
||||
let web3Modal: Web3Modal;
|
||||
let web3Modal: SafeAppWeb3Modal;
|
||||
let web3Provider: any;
|
||||
|
||||
let providerOptions = {};
|
||||
|
@ -40,7 +40,7 @@ export function useWeb3() {
|
|||
return;
|
||||
}
|
||||
|
||||
web3Modal = new Web3Modal({
|
||||
web3Modal = new SafeAppWeb3Modal({
|
||||
disableInjectedProvider: false,
|
||||
cacheProvider: true,
|
||||
providerOptions
|
||||
|
@ -52,7 +52,7 @@ export function useWeb3() {
|
|||
});
|
||||
|
||||
const activate = async () => {
|
||||
web3Provider = await web3Modal.connect();
|
||||
web3Provider = await web3Modal.requestProvider();
|
||||
active.value = true;
|
||||
if (web3Provider.selectedAddress) {
|
||||
account.value = web3Provider.selectedAddress;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
"generate": "nuxt generate"
|
||||
},
|
||||
"dependencies": {
|
||||
"@gnosis.pm/safe-apps-sdk": "^4.2.0",
|
||||
"@gnosis.pm/safe-apps-web3modal": "^2.0.0",
|
||||
"@nuxtjs/axios": "^5.13.6",
|
||||
"@nuxtjs/composition-api": "^0.24.7",
|
||||
"@portis/web3": "^4.0.5",
|
||||
|
|
|
@ -1,41 +1,52 @@
|
|||
{
|
||||
"name": "App",
|
||||
"icons": [
|
||||
{
|
||||
"src": "\/android-icon-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
}
|
||||
]
|
||||
"short_name": "Assembly",
|
||||
"name": "Instadapp - Assembly",
|
||||
"description": "The Most Powerful DeFi Management Platform",
|
||||
"iconPath": "/android-icon-192x192.png",
|
||||
"providedBy": {
|
||||
"name": "InstaDApp Labs LLC",
|
||||
"url": "https://instadapp.io/"
|
||||
},
|
||||
"start_url": "/",
|
||||
"display": "minimal-ui",
|
||||
"theme_color": "#3F75FF",
|
||||
"background_color": "#ffffff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "\/android-icon-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "\/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
}
|
||||
]
|
||||
}
|
22
yarn.lock
22
yarn.lock
|
@ -1136,6 +1136,26 @@
|
|||
dependencies:
|
||||
purgecss "^4.0.3"
|
||||
|
||||
"@gnosis.pm/safe-apps-provider@0.7.1":
|
||||
version "0.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-provider/-/safe-apps-provider-0.7.1.tgz#d55ba011cd496322faa346a50c1b6aea64b1da43"
|
||||
integrity sha512-+y+hQ9Zr1GGrzehqdkhOUTEX1Ixm0jGUGMxbXQbG4C3PJRvQ2UVoqIXa7CJcqg0Gzru2bOM5CzNvv8pxxv23GA==
|
||||
dependencies:
|
||||
"@gnosis.pm/safe-apps-sdk" "4.2.0"
|
||||
events "^3.3.0"
|
||||
|
||||
"@gnosis.pm/safe-apps-sdk@4.2.0", "@gnosis.pm/safe-apps-sdk@^4.2.0":
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-sdk/-/safe-apps-sdk-4.2.0.tgz#77069de1b4f3db724d1ded1fab39e1feacc7bc05"
|
||||
integrity sha512-GpaxIbi658+KLtJpTGq6qdpVkbW7OQUKh8i0uhZ04SiAoIAtR9QNbP7V04OvvuqhKjhvCnvh37mJH2RZ2zZHDA==
|
||||
|
||||
"@gnosis.pm/safe-apps-web3modal@^2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-web3modal/-/safe-apps-web3modal-2.0.0.tgz#4da6ab5d62191d5454d3d8eecbfbb6daf38aa92b"
|
||||
integrity sha512-c0IUukQTvN7c2YB5JkFCF2Rlerud3Ei2CHUaCDykH+4fiGWc0mscFNnPA0v9VZHpkD6kZdfXG7OjsoPCYNdEGQ==
|
||||
dependencies:
|
||||
"@gnosis.pm/safe-apps-provider" "0.7.1"
|
||||
|
||||
"@json-rpc-tools/types@^1.6.1":
|
||||
version "1.7.6"
|
||||
resolved "https://registry.yarnpkg.com/@json-rpc-tools/types/-/types-1.7.6.tgz#5abd5fde01364a130c46093b501715bcce5bdc0e"
|
||||
|
@ -5226,7 +5246,7 @@ eventemitter3@4.0.7, eventemitter3@^4.0.0:
|
|||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
|
||||
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
|
||||
|
||||
events@^3.0.0:
|
||||
events@^3.0.0, events@^3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
|
||||
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
|
||||
|
|
Loading…
Reference in New Issue
Block a user