Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rollux mainnet changes #2

Open
wants to merge 3 commits into
base: safe-main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ name: Deploy to Dockerhub
on:
push:
branches:
- main
- safe-main
- dev
release:
types: [ released ]

jobs:
dockerhub-push:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
if: github.ref == 'refs/heads/safe-main' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- name: Dockerhub login
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ WORKDIR /app
COPY . .

# install deps
RUN git clone https://github.com/SYS-Labs/safe-deployments /safe-deployments
RUN cd /safe-deployments; yarn; yarn add --dev rimraf [email protected] @types/semver; yarn rimraf dist && yarn tsc
RUN yarn add file:/safe-deployments
RUN yarn install
RUN yarn fix

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
"react-redux": "^8.0.5",
"semver": "^7.3.7"
},
"resolutions": {
"@safe-global/safe-deployments": "https://github.com/SYS-Labs/safe-deployments#main"
},
"devDependencies": {
"@next/bundle-analyzer": "^13.1.1",
"@openzeppelin/contracts": "^4.9.2",
Expand Down
14 changes: 8 additions & 6 deletions scripts/github/deploy_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
set -euo pipefail

export DOCKER_BUILDKIT=1
# Todo: Change this to SYSLABS
export DOCKER_OWNER=syscointed

if [ "$1" = "dev" -o "$1" = "main" ]; then
# If image does not exist, don't use cache
docker pull safeglobal/$DOCKERHUB_PROJECT:$1 && \
docker build -t $DOCKERHUB_PROJECT . --cache-from safeglobal/$DOCKERHUB_PROJECT:$1 --build-arg BUILDKIT_INLINE_CACHE=1 || \
docker build -t $DOCKERHUB_PROJECT . --cache-from $DOCKER_OWNER/$DOCKERHUB_PROJECT:$1 --build-arg BUILDKIT_INLINE_CACHE=1 || \
docker build -t $DOCKERHUB_PROJECT . --build-arg BUILDKIT_INLINE_CACHE=1
else
# Building tag version from staging image (vX.X.X)
docker pull safeglobal/$DOCKERHUB_PROJECT:staging && \
docker build -t $DOCKERHUB_PROJECT . --cache-from safeglobal/$DOCKERHUB_PROJECT:staging --build-arg BUILDKIT_INLINE_CACHE=1 || \
docker build -t $DOCKERHUB_PROJECT . --cache-from $DOCKER_OWNER/$DOCKERHUB_PROJECT:staging --build-arg BUILDKIT_INLINE_CACHE=1 || \
docker build -t $DOCKERHUB_PROJECT . --build-arg BUILDKIT_INLINE_CACHE=1
# Only push latest on release
case $1 in v*)
docker tag $DOCKERHUB_PROJECT safeglobal/$DOCKERHUB_PROJECT:latest
docker push safeglobal/$DOCKERHUB_PROJECT:latest
docker tag $DOCKERHUB_PROJECT $DOCKER_OWNER/$DOCKERHUB_PROJECT:latest
docker push $DOCKER_OWNER/$DOCKERHUB_PROJECT:latest
esac
fi
docker tag $DOCKERHUB_PROJECT safeglobal/$DOCKERHUB_PROJECT:$1
docker push safeglobal/$DOCKERHUB_PROJECT:$1
docker tag $DOCKERHUB_PROJECT $DOCKER_OWNER/$DOCKERHUB_PROJECT:$1
docker push $DOCKER_OWNER/$DOCKERHUB_PROJECT:$1
2 changes: 1 addition & 1 deletion src/components/safe-apps/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const FEATURES = [
'speaker-selection',
]

export type AllowedFeatures = typeof FEATURES[number]
export type AllowedFeatures = (typeof FEATURES)[number]

export const isBrowserFeature = (featureKey: string): featureKey is AllowedFeatures => {
return FEATURES.includes(featureKey as AllowedFeatures)
Expand Down
11 changes: 5 additions & 6 deletions src/services/ens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ export function isDomain(domain: string): boolean {

export const resolveName = async (rpcProvider: JsonRpcProvider, name: string): Promise<string | undefined> => {
try {
const network = await rpcProvider.getNetwork();
const resolver = "function" === typeof network._defaultProvider ?
network._defaultProvider(network) || {} : {}
const network = await rpcProvider.getNetwork()
const resolver = 'function' === typeof network._defaultProvider ? network._defaultProvider(network) || {} : {}

if ("object" === typeof resolver && resolver.network) {
console.log("Resolve name with custom method");
if ("any" === resolver.network) {
if ('object' === typeof resolver && resolver.network) {
console.log('Resolve name with custom method')
if ('any' === resolver.network) {
const provider = new JsonRpcProvider(resolver.url, resolver.network)
return (await provider.resolveName(name)) || undefined
}
Expand Down
6 changes: 3 additions & 3 deletions src/services/pairing/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ const pairingModule = (): WalletInit => {
public chains: Chain[]
public disconnect: EIP1193Provider['disconnect']
// @ts-expect-error - 'emit' does not exist on `typeof EventEmitter`
public emit: typeof EventEmitter['emit']
public emit: (typeof EventEmitter)['emit']
// @ts-expect-error - 'on' does not exist on `typeof EventEmitter`
public on: typeof EventEmitter['on']
public on: (typeof EventEmitter)['on']
// @ts-expect-error - 'removeListener' does not exist on `typeof EventEmitter`
public removeListener: typeof EventEmitter['removeListener']
public removeListener: (typeof EventEmitter)['removeListener']

private disconnected$: InstanceType<typeof Subject>
private providers: Record<string, InstanceType<typeof StaticJsonRpcProvider>>
Expand Down
7 changes: 3 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3122,10 +3122,9 @@
semver "^7.3.8"
web3-utils "^1.8.1"

"@safe-global/safe-deployments@^1.20.2", "@safe-global/safe-deployments@^1.22.0":
version "1.24.0"
resolved "https://registry.yarnpkg.com/@safe-global/safe-deployments/-/safe-deployments-1.24.0.tgz#0acccd2427100ff52b4679de44438a8e9c148b5b"
integrity sha512-NzJ3wHt/aXAxLPrjsqD1z3qKUgIprf2hSJDKE/nys6zAIPFOvm6hy1he11m6MIv4ncPNosdMJ7azooKgxNDcVA==
"@safe-global/safe-deployments@^1.20.2", "@safe-global/safe-deployments@^1.22.0", "@safe-global/safe-deployments@https://github.com/SYS-Labs/safe-deployments#main":
version "1.23.0"
resolved "https://github.com/SYS-Labs/safe-deployments#00695a38f020a14f587d63a3069dcf74c46c7780"
dependencies:
semver "^7.3.7"

Expand Down