Skip to content

Commit

Permalink
Image bundles (#205)
Browse files Browse the repository at this point in the history
* bundles images with the package

* adds worflow for publishing new releases to npm
  • Loading branch information
mathewmeconry committed Apr 5, 2022
1 parent 39a6072 commit 093f960
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 20 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: yarn --frozen-lockfile
- run: yarn build
- run: yarn publish --no-git-tag-version --new-version ${{ github.event.release.tag_name }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
21 changes: 12 additions & 9 deletions src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,18 @@ const CHAIN_INFORMATION = new Map<number, ChainInformation | ChainType>([
testnet: true,
},
],
[250, {
id: 250,
nativeCurrency: FTM,
type: 'fantom',
fullName: 'Fantom Opera Mainnet',
shortName: 'FTM',
explorerUrl: `https://ftmscan.com/`,
testnet: false
}],
[
250,
{
id: 250,
nativeCurrency: FTM,
type: 'fantom',
fullName: 'Fantom Opera Mainnet',
shortName: 'FTM',
explorerUrl: `https://ftmscan.com/`,
testnet: false,
},
],
[
1666600000,
{
Expand Down
Binary file added src/images/Cipher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/Fortmatic.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/Frame.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/Metamask.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images/Portis.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/Status.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/images/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export { default as Cipher } from './Cipher.png'
export { default as Fortmatic } from './Fortmatic.svg'
export { default as Frame } from './Frame.png'
export { default as Metamask } from './Metamask.png'
export { default as Portis } from './Portis.svg'
export { default as Status } from './Status.png'
export { default as wallet } from './wallet.svg'
export { default as walletconnect } from './walletconnect.png'
1 change: 1 addition & 0 deletions src/images/wallet.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/walletconnect.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 9 additions & 11 deletions src/providers/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Provider } from '../types'
import * as Images from '../images/index'

declare global {
interface Window {
Expand All @@ -15,17 +16,14 @@ function isElectron() {
)
}

const BASE_URL =
'https://storageapi.fleek.co/aragonone-team-bucket/wallet-icons'

// See the corresponding prop type, EthereumProviderType, in prop-types.js.
const PROVIDERS = new Map<string, Provider>(
[
{
id: 'frame',
name: 'Frame',
type: 'Desktop',
image: `${BASE_URL}/Frame.png`,
image: Images.Frame,
strings: {
'your Ethereum wallet': 'Frame',
},
Expand All @@ -34,7 +32,7 @@ const PROVIDERS = new Map<string, Provider>(
id: 'metamask',
name: 'Metamask',
type: 'Desktop',
image: `${BASE_URL}/Metamask.png`,
image: Images.Metamask,
strings: {
'your Ethereum wallet': 'Metamask',
},
Expand All @@ -43,7 +41,7 @@ const PROVIDERS = new Map<string, Provider>(
id: 'status',
name: 'Status',
type: 'Mobile',
image: `${BASE_URL}/Status.png`,
image: Images.Status,
strings: {
'your Ethereum wallet': 'Status',
},
Expand All @@ -52,7 +50,7 @@ const PROVIDERS = new Map<string, Provider>(
id: 'cipher',
name: 'Cipher',
type: 'Mobile',
image: `${BASE_URL}/Cipher.png`,
image: Images.Cipher,
strings: {
'your Ethereum wallet': 'Cipher',
},
Expand All @@ -61,7 +59,7 @@ const PROVIDERS = new Map<string, Provider>(
id: 'fortmatic',
name: 'Fortmatic',
type: 'Any',
image: `${BASE_URL}/Fortmatic.svg`,
image: Images.Fortmatic,
strings: {
'your Ethereum wallet': 'Fortmatic',
},
Expand All @@ -70,7 +68,7 @@ const PROVIDERS = new Map<string, Provider>(
id: 'portis',
name: 'Portis',
type: 'Any',
image: `${BASE_URL}/Portis.svg`,
image: Images.Portis,
strings: {
'your Ethereum wallet': 'Portis',
},
Expand All @@ -79,7 +77,7 @@ const PROVIDERS = new Map<string, Provider>(
id: 'walletconnect',
name: 'WalletConnect',
type: 'Any',
image: `${BASE_URL}/walletconnect.png`,
image: Images.walletconnect,
strings: {
'your Ethereum wallet': 'WalletConnect',
},
Expand All @@ -88,7 +86,7 @@ const PROVIDERS = new Map<string, Provider>(
id: 'unknown',
name: 'Unknown',
type: 'Desktop',
image: `${BASE_URL}/wallet.svg`,
image: Images.wallet,
strings: {
'your Ethereum wallet': 'your wallet',
},
Expand Down

0 comments on commit 093f960

Please sign in to comment.