Skip to content

Commit

Permalink
fix: enables Snap on the production (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
impelcrypto authored Nov 15, 2023
1 parent 331f97a commit 7edaf8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions src/components/header/modals/ModalConnectWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
<button
v-for="(wallet, index) in nativeWallets"
:key="index"
:disabled="checkIsDisabledWallet(wallet.source) || isZkEvm"
:disabled="isZkEvm"
class="box__row--wallet box--hover--active"
:class="currentWallet === wallet.source && 'border--active'"
@click="!checkIsDisabledWallet(wallet.source) && setSubstrateWalletModal(wallet.source)"
@click="setSubstrateWalletModal(wallet.source)"
>
<div class="box--img">
<img :src="wallet.img" />
Expand Down Expand Up @@ -172,7 +172,6 @@ import { initiatePolkdatodSnap } from 'src/modules/snap';
import { useStore } from 'src/store';
import { SubstrateAccount } from 'src/store/general/state';
import { PropType, computed, defineComponent, ref } from 'vue';
import { productionOrigin } from 'src/links';
export default defineComponent({
props: {
Expand Down Expand Up @@ -224,13 +223,6 @@ export default defineComponent({
props.setCloseModal();
};
const checkIsDisabledWallet = (source: SupportWallet): boolean => {
if (source === SupportWallet.Snap && window.location.origin === productionOrigin) {
return true;
}
return false;
};
const nativeWallets = computed(() => {
return supportWallets
.map((it) => {
Expand Down Expand Up @@ -327,7 +319,6 @@ export default defineComponent({
setEvmWalletModal,
disconnectAccount,
setPolkasafeModal,
checkIsDisabledWallet,
setAccountUnificationModal,
currentNetworkIdx,
endpointKey,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/snap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface SnapConfig {
unit?: UnitConfiguration;
}

export const snapId = process.env.DEV ? 'local:http://localhost:8081' : 'npm:@astar-network/snap';
export const snapId = 'npm:@astar-network/snap';

export async function enablePolkadotSnap(
config: SnapConfig = { networkName: 'shibuya' },
Expand Down

0 comments on commit 7edaf8d

Please sign in to comment.