Skip to content

Commit

Permalink
Merge pull request #45 from airgap-it/feat/update-beacon-and-networks
Browse files Browse the repository at this point in the history
feat(beacon): update beacon and networks
  • Loading branch information
AndreasGassmann authored Apr 29, 2021
2 parents f105701 + 21e6055 commit 6e5924d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spire",
"version": "2.2.1",
"version": "2.2.2",
"author": "AirGap",
"homepage": "https://airgap.it/",
"scripts": {
Expand All @@ -25,7 +25,7 @@
},
"private": true,
"dependencies": {
"@airgap/beacon-sdk": "2.2.1",
"@airgap/beacon-sdk": "2.2.5",
"@airgap/coinlib-core": "0.10.6",
"@angular/common": "^11.0.3",
"@angular/core": "^11.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/settings/settings.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<ion-label>Active Network</ion-label>
<ion-select [(ngModel)]="networkType" (ionChange)="updateNetworkType()" placeholder="Select Network">
<ion-select-option value="mainnet">Mainnet</ion-select-option>
<ion-select-option value="delphinet">Delphinet</ion-select-option>
<ion-select-option value="edonet">Edonet</ion-select-option>
<ion-select-option value="florencenet">Florencenet</ion-select-option>
<ion-select-option value="custom">Custom</ion-select-option>
</ion-select>
</ion-item>
Expand Down
8 changes: 7 additions & 1 deletion src/app/services/settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,37 +42,43 @@ export class SettingsService {
[NetworkType.MAINNET]: 'https://tezos-node.prod.gke.papers.tech',
[NetworkType.DELPHINET]: 'https://tezos-delphinet-node.prod.gke.papers.tech',
[NetworkType.EDONET]: 'https://tezos-edonet-node.prod.gke.papers.tech',
[NetworkType.FLORENCENET]: 'https://florence-tezos.giganode.io', // TODO: UPDATE TO PAPERS URL
[NetworkType.CUSTOM]: ''
}
const apiUrls: { [key in NetworkType]: string } = {
[NetworkType.MAINNET]: 'https://tezos-mainnet-conseil.prod.gke.papers.tech',
[NetworkType.DELPHINET]: 'https://tezos-delphinet-conseil.prod.gke.papers.tech',
[NetworkType.EDONET]: 'https://tezos-edonet-conseil.prod.gke.papers.tech',
[NetworkType.FLORENCENET]: '', // TODO: ADD CONSEIL URL
[NetworkType.CUSTOM]: ''
}

const names: { [key in NetworkType]: string } = {
[NetworkType.MAINNET]: 'Mainnet',
[NetworkType.DELPHINET]: 'Delphinet',
[NetworkType.EDONET]: 'Edonet',
[NetworkType.FLORENCENET]: 'Florencenet',
[NetworkType.CUSTOM]: 'Custom'
}
const airgapNetworks: { [key in NetworkType]: AirGapNetworkType } = {
[NetworkType.MAINNET]: AirGapNetworkType.MAINNET,
[NetworkType.DELPHINET]: AirGapNetworkType.TESTNET,
[NetworkType.EDONET]: AirGapNetworkType.TESTNET,
[NetworkType.FLORENCENET]: AirGapNetworkType.TESTNET,
[NetworkType.CUSTOM]: AirGapNetworkType.CUSTOM
}
const blockExplorers: { [key in NetworkType]: string } = {
[NetworkType.MAINNET]: 'https://tezblock.io',
[NetworkType.DELPHINET]: 'https://delphinet.tezblock.io',
[NetworkType.EDONET]: 'https://edonet.tezblock.io',
[NetworkType.CUSTOM]: 'https://edonet.tezblock.io'
[NetworkType.FLORENCENET]: 'https://florencenet.tezblock.io',
[NetworkType.CUSTOM]: 'https://florencenet.tezblock.io'
}
const tezosNetworks: { [key in NetworkType]: TezosNetwork } = {
[NetworkType.MAINNET]: TezosNetwork.MAINNET,
[NetworkType.DELPHINET]: TezosNetwork.DELPHINET,
[NetworkType.EDONET]: TezosNetwork.EDONET,
[NetworkType.FLORENCENET]: TezosNetwork.EDONET, // TODO: UPDATE IN COINLIB
[NetworkType.CUSTOM]: TezosNetwork.EDONET
}

Expand Down
11 changes: 9 additions & 2 deletions src/extension/extension-client/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ export const getRpcUrlForNetwork: (network: Network) => Promise<{ rpcUrl: string
[NetworkType.MAINNET]: 'https://tezos-node.prod.gke.papers.tech',
[NetworkType.DELPHINET]: 'https://tezos-delphinet-node.prod.gke.papers.tech',
[NetworkType.EDONET]: 'https://tezos-edonet-node.prod.gke.papers.tech',
[NetworkType.FLORENCENET]: 'https://florence-tezos.giganode.io',
[NetworkType.CUSTOM]: ''
}
const apiUrls: { [key in NetworkType]: string } = {
[NetworkType.MAINNET]: 'https://tezos-mainnet-conseil.prod.gke.papers.tech',
[NetworkType.DELPHINET]: 'https://tezos-delphinet-conseil.prod.gke.papers.tech',
[NetworkType.EDONET]: 'https://tezos-edonet-conseil.prod.gke.papers.tech',
[NetworkType.FLORENCENET]: '',
[NetworkType.CUSTOM]: ''
}

Expand All @@ -40,24 +42,28 @@ export const getProtocolForNetwork: (network: Network) => Promise<TezosProtocol>
[NetworkType.MAINNET]: 'Mainnet',
[NetworkType.DELPHINET]: 'Delphinet',
[NetworkType.EDONET]: 'Edonet',
[NetworkType.FLORENCENET]: 'Florencenet',
[NetworkType.CUSTOM]: 'Custom'
}
const airgapNetworks: { [key in NetworkType]: AirGapNetworkType } = {
[NetworkType.MAINNET]: AirGapNetworkType.MAINNET,
[NetworkType.DELPHINET]: AirGapNetworkType.TESTNET,
[NetworkType.EDONET]: AirGapNetworkType.TESTNET,
[NetworkType.FLORENCENET]: AirGapNetworkType.TESTNET,
[NetworkType.CUSTOM]: AirGapNetworkType.CUSTOM
}
const blockExplorers: { [key in NetworkType]: string } = {
[NetworkType.MAINNET]: 'https://tezblock.io',
[NetworkType.DELPHINET]: 'https://delphinet.tezblock.io',
[NetworkType.EDONET]: 'https://edonet.tezblock.io',
[NetworkType.CUSTOM]: 'https://edonet.tezblock.io'
}
[NetworkType.FLORENCENET]: 'https://florencenet.tezblock.io',
[NetworkType.CUSTOM]: 'https://florencenet.tezblock.io'
}
const tezosNetworks: { [key in NetworkType]: TezosNetwork } = {
[NetworkType.MAINNET]: TezosNetwork.MAINNET,
[NetworkType.DELPHINET]: TezosNetwork.DELPHINET,
[NetworkType.EDONET]: TezosNetwork.EDONET,
[NetworkType.FLORENCENET]: TezosNetwork.EDONET, // TODO: UPDATE IN COINLIB
[NetworkType.CUSTOM]: TezosNetwork.EDONET
}

Expand Down Expand Up @@ -88,6 +94,7 @@ export const getTezblockLinkForNetwork: (network: Network | undefined) => Promis
[NetworkType.MAINNET]: 'https://tezblock.io/account/',
[NetworkType.DELPHINET]: 'https://delphinet.tezblock.io/account/',
[NetworkType.EDONET]: 'https://edonet.tezblock.io/account/',
[NetworkType.FLORENCENET]: 'https://florencenet.tezblock.io/account/',
[NetworkType.CUSTOM]: 'http://localhost:8100/account/'
}
const url: string = urls[network ? network.type : NetworkType.MAINNET]
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Spire",
"version": "2.2.1",
"version": "2.2.2",
"description": "Spire allows you to interact with Tezos dApps that support the Beacon SDK.",
"icons": {
"16": "assets/icon/spire-logo-16px.png",
Expand Down

0 comments on commit 6e5924d

Please sign in to comment.