Skip to content

Commit

Permalink
Telos Cloud with Metakeep
Browse files Browse the repository at this point in the history
  • Loading branch information
Viterbo committed Jan 3, 2024
1 parent 171a9a2 commit 0c9009a
Show file tree
Hide file tree
Showing 23 changed files with 20 additions and 918 deletions.
6 changes: 1 addition & 5 deletions env.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const sharedEnv = {
PROJECT_ID: '2392473d6d98499c7138cd2d705a791f',
METAKEEP_APP_ID_NATIVE: 'ad5e05fb-280a-41ae-b186-5a2654567b92',
METAKEEP_APP_ID_EVM: 'd190c88f-1bb5-4e16-bc48-96dbf33b77e0',
GOOGLE_APP_ID: '639241197544-kcubenhmti6u7ef3uj360n2lcl5cmn8c.apps.googleusercontent.com',
GOOGLE_APP_ID: '56634824599-ff3iu788c32c3s7ec65cs4bieop9gpgv.apps.googleusercontent.com',
};

const TESTNET = {
Expand All @@ -25,8 +25,6 @@ const TESTNET = {
HYPERION_ENDPOINT: 'https://testnet.telos.net',
NETWORK_EXPLORER: 'https://explorer-test.telos.net',
CHAIN_NAME: 'telos-testnet',
OREID_APP_ID: 't_75a4d9233ec441d18c4221e92b379197',
OREID_APP_ID_NATIVE: 't_a61e9926d5204387a9ac113dfce7cbc5',
};

const MAINNET = {
Expand All @@ -40,8 +38,6 @@ const MAINNET = {
HYPERION_ENDPOINT: 'https://mainnet.telos.net',
NETWORK_EXPLORER: 'https://explorer.telos.net',
CHAIN_NAME: 'telos',
OREID_APP_ID: 'p_e5b81fcc20a04339993b0cc80df7e3fd',
OREID_APP_ID_NATIVE: 'p_751f87258d5b40998b55c626d612fd4e',
};

const env = process.env.NETWORK === 'mainnet' ? MAINNET : TESTNET;
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@
"mitt": "^3.0.0",
"node-polyfill-webpack-plugin": "^2.0.1",
"numeral": "^2.0.6",
"oreid-js": "^4.7.1",
"oreid-webpopup": "^2.4.0",
"pinia": "^2.0.33",
"ptokens": "^0.14.0",
"qrcanvas-vue": "^3.0.0",
"qrious": "4.0.2",
"quasar": "2",
"rxjs": "^7.8.0",
"ual-anchor": "^1.1.2",
"ual-oreid": "^1.0.0",
"ual-wombat": "^0.3.3",
"universal-authenticator-library": "^0.3.0",
"vue": "3",
Expand Down
21 changes: 1 addition & 20 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<script lang="ts">
import { getAntelope, useChainStore } from 'src/antelope';
import { useChainStore } from 'src/antelope';
import EVMChainSettings from 'src/antelope/chains/EVMChainSettings';
import { TELOS_CHAIN_IDS } from 'src/antelope/chains/chain-constants';
import packageInfo from '../package.json';
import { defineComponent } from 'vue';
export const isTodayBeforeTelosCloudDown = new Date().getTime() < new Date('2023-12-31').getTime();
export default defineComponent({
name: 'App',
created() {
Expand Down Expand Up @@ -54,23 +52,6 @@ export default defineComponent({
script.defer = true;
document.body.appendChild(script);
}
if (isTodayBeforeTelosCloudDown) {
getAntelope().config.notifyRememberInfoHandler(
this.$t('temporal.telos_cloud_discontinued_title'),
[{
tag: 'p',
class: 'c-notify__message--subtitle',
text: this.$t('temporal.telos_cloud_discontinued_message_title'),
}, {
tag: 'p',
class: '',
text: this.$t('temporal.telos_cloud_discontinued_message_body'),
}],
'',
'telos-cloud-discontinued',
);
}
},
});
</script>
Expand Down
2 changes: 0 additions & 2 deletions src/antelope/chains/chain-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export const TELOS_ANALYTICS_EVENT_IDS = {
loginFailedMetamask: 'ZFGE6TFS',
loginSuccessfulSafepal: 'LKCBKDU2',
loginFailedSafepal: '6PSIWGNV',
loginSuccessfulOreId: 'MSXMDDNK',
loginFailedOreId: 'UFX3JYRJ',
loginFailedWalletConnect: '9V4IV1BV',
loginSuccessfulWalletConnect: '2EG2OR3H',
};
Expand Down
87 changes: 0 additions & 87 deletions src/antelope/migration.ts

This file was deleted.

4 changes: 1 addition & 3 deletions src/antelope/stores/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import { EVMAuthenticator } from 'src/antelope/wallets';
import { truncateAddress } from 'src/antelope/stores/utils/text-utils';
import { toRaw } from 'vue';
import { getAddress } from 'ethers/lib/utils';
import { OreIdAuthenticator } from 'ual-oreid';


export interface LoginNativeActionData {
Expand Down Expand Up @@ -123,8 +122,7 @@ export const useAccountStore = defineStore(store_name, {
await authenticator.init();
const ualUsers = await authenticator.login();
if (ualUsers?.length) {
// OreId has it's own authorization service, only init fuel service for other ual users
const ualUser = ualUsers[0] instanceof OreIdAuthenticator ? ualUsers[0] : await initFuelUserWrapper(ualUsers[0]);
const ualUser = await initFuelUserWrapper(ualUsers[0]);
const permission = (ualUser as unknown as { requestPermission: string })
.requestPermission ?? 'active';
const account = await ualUser.getAccountName();
Expand Down
1 change: 0 additions & 1 deletion src/antelope/types/ual-oreid.d.ts

This file was deleted.

Loading

0 comments on commit 0c9009a

Please sign in to comment.