Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spruceid/siwe-oidc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: energywebfoundation/siwe-oidc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ew
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 7 commits
  • 3 files changed
  • 3 contributors

Commits on May 8, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ae9d76a View commit details
  2. cleanups

    Timtech4u authored May 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6d8b633 View commit details
  3. chore: add test branch

    Timtech4u authored May 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    695824f View commit details

Commits on May 9, 2024

  1. chore: project id args

    Timtech4u authored May 9, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ccb9c04 View commit details
  2. fix typo

    Timtech4u authored May 9, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e29d608 View commit details

Commits on May 14, 2024

  1. feat(App.svelte): change chains to volta and ewc (#1)

    This prevents a "please change chains" pop-up
    jrhender authored May 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c8b30a5 View commit details

Commits on Jul 17, 2024

  1. feat: update message on SIWE sign-in [SWTCH-3038] (#3)

    Co-authored-by: whitneypurdum <[email protected]>
    jrhender and whitneypurdum authored Jul 17, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    82db322 View commit details
Showing with 43 additions and 10 deletions.
  1. +5 −6 .github/workflows/docker.yml
  2. +5 −2 Dockerfile
  3. +33 −2 js/ui/src/App.svelte
11 changes: 5 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -2,22 +2,21 @@ name: Publish Docker

on:
push:
branches: [ main ]
release:
types: [published, created, edited]
branches: [ ew ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Build and push image
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: spruceid/siwe_oidc
name: ghcr.io/energywebfoundation/siwe_oidc
username: ${{ github.actor }}
password: ${{ secrets.GH_PACKAGE_PUSH_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
tag_names: true
tag_semver: true
snapshot: true
buildargs: PROJECT_ID=${{ secrets.PROJECT_ID }}
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -7,14 +7,15 @@ COPY ./src/ ./src/
COPY ./Cargo.lock ./
COPY ./Cargo.toml ./
COPY ./siwe-oidc.toml ./
RUN cargo chef prepare --recipe-path recipe.json
RUN cargo chef prepare --recipe-path recipe.json

FROM chef as dep_cacher
COPY --from=dep_planner /siwe-oidc/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json

FROM node:16-alpine as node_builder
ENV PROJECT_ID=""
ARG PROJECT_ID
ENV PROJECT_ID=${PROJECT_ID}
ADD --chown=node:node ./static /siwe-oidc/static
ADD --chown=node:node ./js/ui /siwe-oidc/js/ui
WORKDIR /siwe-oidc/js/ui
@@ -28,6 +29,8 @@ COPY --from=dep_planner /siwe-oidc/ ./
RUN cargo build --release

FROM alpine
ARG PROJECT_ID
ENV PROJECT_ID=${PROJECT_ID}
COPY --from=builder /siwe-oidc/target/x86_64-unknown-linux-musl/release/siwe-oidc /usr/local/bin/
WORKDIR /siwe-oidc
RUN mkdir -p ./static
35 changes: 33 additions & 2 deletions js/ui/src/App.svelte
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
import { getAccount, signMessage, reconnect, getConnections} from '@wagmi/core';
import { SiweMessage } from 'siwe';
import Cookies from 'js-cookie';
import { type Chain } from 'viem';
// TODO: REMOVE DEFAULTS:
// main.ts will parse the params from the server
@@ -21,7 +22,37 @@
$: status = 'Not Logged In';
const chains = [mainnet, arbitrum, polygon];
export const volta = {
id: 73799,
name: 'Volta',
network: 'volta',
nativeCurrency: {
name: 'Volta Token',
symbol: 'VT',
decimals: 18,
},
rpcUrls: {
public: { http: ['https://volta-rpc.energyweb.org'] },
default: { http: ['https://volta-rpc.energyweb.org'] },
}
} as const satisfies Chain
export const ewc = {
id: 246,
name: 'Energy Web Chain',
network: 'ewc',
nativeCurrency: {
name: 'Energy Web Token',
symbol: 'EWT',
decimals: 18,
},
rpcUrls: {
public: { http: ['https://rpc.energyweb.org'] },
default: { http: ['https://rpc.energyweb.org'] },
}
} as const satisfies Chain
const chains = [volta, ewc];
const config = defaultWagmiConfig({
chains,
@@ -121,7 +152,7 @@
{/if}
<h5>Welcome</h5>
<span class="text-xs">
Sign-In with Ethereum to continue to {client_metadata.client_name ? client_metadata.client_name : domain}
Sign-In with Ethereum to continue to the Green Incentive Program
</span>

<button