Skip to content

Commit

Permalink
Attempt to fix unit tests:
Browse files Browse the repository at this point in the history
- updated snapshots
- patched protocol package to fix node engine incompatibility issue
- patched protocol package to use swc/core version compatible with ts-node and fix contracts build
  • Loading branch information
johnsmith-gooddollar committed Oct 10, 2023
1 parent 6f5beb0 commit 0ea4920
Show file tree
Hide file tree
Showing 18 changed files with 5,070 additions and 1,148 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/webtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
python-version: '3.7.x'

- name: Install dependencies
run: yarn --immutable
run: yarn

- uses: actions/cache@v2
id: contractsCache
Expand Down
Binary file not shown.
49 changes: 49 additions & 0 deletions .yarn/patches/@gooddollar-goodprotocol-npm-2.0.14-aefd0cca7d.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
diff --git a/package.json b/package.json
index 32ffa522e902a8d16f89bdc9369265e35d9e07c6..4f8915032b119c4c6643752240ef8fc99c6cc01f 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "2.0.14",
"description": "GoodDollar Protocol",
"engines": {
- "node": "18.x"
+ "node": ">=16.x"
},
"main": "dist/test-sdk/index.js",
"scripts": {
@@ -93,7 +93,7 @@
"@nomiclabs/hardhat-ethers": "^2.2.1",
"@nomiclabs/hardhat-etherscan": "^3.1.0",
"@nomiclabs/hardhat-waffle": "^2.0.3",
- "@swc/core": "^1.2.196",
+ "@swc/core": "1.3.82",
"@swc/helpers": "^0.3.16",
"@typechain/ethers-v5": "^8.0.2",
"@types/mocha": "*",
@@ -133,5 +133,11 @@
"typechain": "^6.0.2",
"typescript": "*"
},
- "packageManager": "[email protected]"
+ "packageManager": "[email protected]",
+ "resolutions": {
+ "@swc/core": "1.3.82"
+ },
+ "overrides": {
+ "@swc/core": "1.3.82"
+ }
}
diff --git a/releases/deployment.json b/releases/deployment.json
index 701c0acfba43087a044a4cf75eb91ff84a48ad5f..7412f5910a445d42f3eaae0858e6837fd9db4157 100644
--- a/releases/deployment.json
+++ b/releases/deployment.json
@@ -212,6 +212,9 @@
"BancorFormula": "0x57b2c85934Ef1A891eC9b9945f3fdbcf1104c302",
"FeeFormula": "0x416B5A5e12235De6838D62Fd053e7Ce59E944426"
},
+ "development-mainnet": {
+ "networkId": 1
+ },
"staging-mainnet": {
"NameService": "0xC87FAb8A8CDD346079ca6177e47408Ba18066104",
"GReputation": "0xD50604E530fF36B2747aE8574b37B21B9f779d37",
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
"bignumber.js": "9.1.1",
"lottie-react-native": "patch:lottie-react-native@npm:5.1.5#.yarn/patches/lottie-react-native-npm-5.1.5-384eb12f33.patch",
"@usedapp/core": "patch:@usedapp/core@npm:1.2.6#.yarn/patches/@usedapp-core-npm-1.2.6-8dbe982e03.patch",
"@gooddollar/goodprotocol": "patch:@gooddollar/goodprotocol@npm%3A2.0.13#./.yarn/patches/@gooddollar-goodprotocol-npm-2.0.13-b5c4924f17.patch"
"@gooddollar/goodprotocol": "patch:@gooddollar/goodprotocol@npm%3A2.0.14#./.yarn/patches/@gooddollar-goodprotocol-npm-2.0.14-aefd0cca7d.patch"
},
"browserslist": [
">0.2%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ exports[`AppNavigation matches snapshot 1`] = `
}
>
<div
className="css-view-1dbjc4n r-backgroundColor-1jb27wt r-paddingBottom-97e31f r-paddingLeft-bv2aro r-paddingRight-hxflta r-paddingTop-10xqauy r-zIndex-417010"
className="css-view-1dbjc4n r-backgroundColor-1jb27wt r-paddingBottom-97e31f r-paddingLeft-bv2aro r-paddingRight-hxflta r-paddingTop-10xqauy"
style={
Object {
"boxShadow": "0px 3px 4px rgba(0,0,0,0.24)",
"zIndex": 0,
}
}
>
Expand Down Expand Up @@ -236,85 +237,14 @@ exports[`AppNavigation matches snapshot 1`] = `
</div>
</div>
</div>
<div
className="css-view-1dbjc4n"
>
<div
className="css-view-1dbjc4n r-boxShadow-oye7ye r-height-h3s6tt r-marginTop-19qrga8 r-position-bnwqim"
>
<div
className="css-view-1dbjc4n r-cursor-1loqt21 r-touchAction-1otgn73 r-transitionProperty-1i6wzkk r-userSelect-lrvibr"
onClick={[Function]}
onContextMenu={[Function]}
onKeyDown={[Function]}
style={
Object {
"WebkitTransitionDuration": "0s",
"transitionDuration": "0s",
}
}
tabIndex="0"
>
<div
className="css-view-1dbjc4n r-alignItems-1awozwy r-flex-13awgt0 r-height-1pi2tsx r-justifyContent-1777fci r-marginLeft-i5ea98 r-opacity-6dt33c r-position-u8s1d r-transform-1bd4ige r-width-13qz1uu"
>
<div
className="css-view-1dbjc4n r-flexBasis-1mlwlqe r-overflow-1udh08x r-position-u8s1d r-right-zchlnj r-top-ipm5af r-zIndex-417010"
style={
Object {
"backgroundColor": "rgba(0,0,0,1.00)",
"borderBottomLeftRadius": "20px",
"borderBottomRightRadius": "20px",
"borderTopLeftRadius": "20px",
"borderTopRightRadius": "20px",
"height": "40px",
"width": "40px",
}
}
>
<div
className="css-view-1dbjc4n r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-backgroundSize-4gszlv r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw"
style={
Object {
"backgroundImage": "url(\\"https://uploads-ssl.webflow.com/62d761bae8bf2da003f57b06/62d761bae8bf2dea68f57b52_walletchat%20logo.png\\")",
}
}
suppressHydrationWarning={true}
/>
<img
alt=""
className="css-accessibilityImage-9pa8cd"
draggable={false}
src="https://uploads-ssl.webflow.com/62d761bae8bf2da003f57b06/62d761bae8bf2dea68f57b52_walletchat%20logo.png"
/>
</div>
</div>
<div
className="css-view-1dbjc4n r-alignItems-1awozwy r-flex-13awgt0 r-height-1pi2tsx r-justifyContent-1777fci r-marginLeft-i5ea98 r-opacity-orgf3d r-position-u8s1d r-transform-1uie1fx r-width-13qz1uu"
>
<svg
focusable="false"
height="25"
viewBox="0 0 16 14"
width="28"
xmlns="http://www.w3.org/2000/svg"
>
<path
clipRule="evenodd"
d="M.116 4.884l1.768-1.768L8 9.232l6.116-6.116 1.768 1.768L8 12.768.116 4.884z"
fillRule="evenodd"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
<div
className="css-view-1dbjc4n r-alignItems-1awozwy r-justifyContent-1777fci r-marginTop-knv0ih r-opacity-6dt33c r-zIndex-1wyyakw"
className="css-view-1dbjc4n r-alignItems-1awozwy r-justifyContent-1777fci r-marginTop-knv0ih"
style={
Object {
"marginBottom": "8px",
"opacity": 1,
"zIndex": -1,
}
}
>
Expand Down Expand Up @@ -484,40 +414,7 @@ exports[`AppNavigation matches snapshot 1`] = `
"width": "40%",
}
}
>
<div
className="css-view-1dbjc4n r-alignItems-1awozwy r-cursor-1loqt21 r-display-6koalj r-flexDirection-18u37iz r-touchAction-1otgn73 r-transitionProperty-1i6wzkk r-userSelect-lrvibr"
onClick={[Function]}
onContextMenu={[Function]}
onKeyDown={[Function]}
style={
Object {
"WebkitTransitionDuration": "0s",
"transitionDuration": "0s",
}
}
tabIndex="0"
>
<div
className="css-view-1dbjc4n r-alignItems-1awozwy r-display-xoduu5 r-justifyContent-1777fci"
style={Object {}}
>
<span
className="css-text-901oao css-textHasAncestor-16my406 r-fontWeight-1it3c9n"
style={
Object {
"color": "rgba(0,174,255,1.00)",
"fontFamily": "gooddollar",
"fontSize": "30px",
"fontStyle": "normal",
}
}
>
</span>
</div>
</div>
</div>
/>
<div
className="css-view-1dbjc4n r-alignItems-1awozwy r-backgroundColor-b7g440 r-borderRadius-1f0042m r-color-vaa0vc r-display-6koalj r-flexDirection-eqz5dr r-fontFamily-6jnb14 r-fontWeight-vw2c0b r-justifyContent-1777fci r-padding-t60dpp r-paddingHorizontal-1e081e0 r-paddingVertical-1yzf0co"
style={
Expand Down Expand Up @@ -1501,7 +1398,12 @@ exports[`AppNavigation matches snapshot 1`] = `
className="css-view-1dbjc4n r-bottom-x89ehc r-height-1lh3azm r-position-u8s1d r-right-zchlnj r-width-1q42mak r-zIndex-1sg8ghl"
>
<div
className="css-view-1dbjc4n r-opacity-orgf3d"
className="css-view-1dbjc4n"
style={
Object {
"opacity": 0,
}
}
>
<div
className="css-view-1dbjc4n r-cursor-1loqt21 r-touchAction-1otgn73 r-transitionProperty-1i6wzkk r-userSelect-lrvibr"
Expand Down
Loading

0 comments on commit 0ea4920

Please sign in to comment.