Skip to content

Commit

Permalink
fix(Farms): Restore farm positions for users & update walletconnect (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gbonumore authored Aug 16, 2022
1 parent 0b93c74 commit 96b5a53
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 104 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@snowpack/plugin-postcss": "^1.1.0",
"@sushiswap/sushi-data": "^0.0.9",
"@tailwindcss/ui": "^0.7.2",
"@walletconnect/web3-provider": "^1.6.6",
"@walletconnect/web3-provider": "^1.8.0",
"animate.css": "^4.1.0",
"aos": "^3.0.0-beta.6",
"authereum": "^0.0.4-beta.164",
Expand Down
2 changes: 1 addition & 1 deletion src/components/piefolio/Farming.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
<span class="text-xs font-thin opacity-80">Staked</span>
<span class="text-xs font-thin opacity-80">Rewards</span>
</div>
<div class="flex flex-col justify-around text-right ml-auto font-thin">
<div class="flex flex-col justify-around text-right ml-auto mt-auto font-thin">
<!-- <span><span class="bg-darkpurple font-bold text-white px-5px py-1px roundedxs text-xs">55.30% APY</span></span> -->
<span class="text-xs font-thin opacity-80"
>{stakingPool.userDeposited} {stakingPool.stakingTokenSymbol}</span
Expand Down
1 change: 0 additions & 1 deletion src/helpers/staking.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ export function initialize(eth) {

observer = observable.subscribe({});

console.log('Start _stakingData', _stakingData);
resolve(_stakingData);
} catch (error) {
displayNotification({
Expand Down
21 changes: 11 additions & 10 deletions src/pages/LPStakingV2.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { get } from "svelte/store";
import { ethers } from "ethers";
import { formatEther } from '@ethersproject/units';
import find from 'lodash/find';
import { getTokenImage } from './../components/helpers.js';
import stakingPools from '../config/stakingPools.json';
Expand Down Expand Up @@ -38,15 +38,16 @@
let poolId = 0;
for (const p of pools) {
if(p.userDeposited.gt(0)) {
res.push({
id: poolId,
userDeposited: Number(formatEther(p.userDeposited)).toFixed(4),
totalDeposited: Number(formatEther(p.totalDeposited)).toFixed(4),
userUnclaimed: Number(formatEther(p.userUnclaimed)).toFixed(4),
...stakingPools[poolId]
})
}
if (p.userDeposited.gt(0)) {
const userPool = {
...find(stakingPools, (p) => p.id === poolId.toString()),
id: poolId,
userDeposited: Number(formatEther(p.userDeposited)).toFixed(4),
totalDeposited: Number(formatEther(p.totalDeposited)).toFixed(4),
userUnclaimed: Number(formatEther(p.userUnclaimed)).toFixed(4),
};
res.push(userPool);
}
poolId++;
}
Expand Down
182 changes: 91 additions & 91 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2367,51 +2367,51 @@
dependencies:
"@types/yargs-parser" "*"

"@walletconnect/browser-utils@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/browser-utils/-/browser-utils-1.6.6.tgz"
integrity sha512-E29xSHU7Akd4jaPehWVGx7ct+SsUzZbxcGc0fz+Pw6/j4Gh5tlfYZ9XuVixuYI4WPdQ2CmOraj8RrVOu5vba4w==
"@walletconnect/browser-utils@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/browser-utils/-/browser-utils-1.8.0.tgz#33c10e777aa6be86c713095b5206d63d32df0951"
integrity sha512-Wcqqx+wjxIo9fv6eBUFHPsW1y/bGWWRboni5dfD8PtOmrihrEpOCmvRJe4rfl7xgJW8Ea9UqKEaq0bIRLHlK4A==
dependencies:
"@walletconnect/safe-json" "1.0.0"
"@walletconnect/types" "^1.6.6"
"@walletconnect/types" "^1.8.0"
"@walletconnect/window-getters" "1.0.0"
"@walletconnect/window-metadata" "1.0.0"
detect-browser "5.2.0"

"@walletconnect/client@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/client/-/client-1.6.6.tgz"
integrity sha512-DDOrxagSmXCciIEr16hTf4gWZ7PG7GXribYTfOOsjtODLtPEODEEYj/AsmEALjh3ZBG4bN35Vj0F/ZA1D+90GQ==
"@walletconnect/client@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/client/-/client-1.8.0.tgz#6f46b5499c7c861c651ff1ebe5da5b66225ca696"
integrity sha512-svyBQ14NHx6Cs2j4TpkQaBI/2AF4+LXz64FojTjMtV4VMMhl81jSO1vNeg+yYhQzvjcGH/GpSwixjyCW0xFBOQ==
dependencies:
"@walletconnect/core" "^1.6.6"
"@walletconnect/iso-crypto" "^1.6.6"
"@walletconnect/types" "^1.6.6"
"@walletconnect/utils" "^1.6.6"
"@walletconnect/core" "^1.8.0"
"@walletconnect/iso-crypto" "^1.8.0"
"@walletconnect/types" "^1.8.0"
"@walletconnect/utils" "^1.8.0"

"@walletconnect/core@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/core/-/core-1.6.6.tgz"
integrity sha512-pSftIVPY6mYz2koZPBEYmeFeAjVf2MSnRHOM6+vx+iAsUEcfMZHkgeXX6GtM6Fjza+zSZu1qnmdgURVXpmKwtQ==
"@walletconnect/core@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-1.8.0.tgz#6b2748b90c999d9d6a70e52e26a8d5e8bfeaa81e"
integrity sha512-aFTHvEEbXcZ8XdWBw6rpQDte41Rxwnuk3SgTD8/iKGSRTni50gI9S3YEzMj05jozSiOBxQci4pJDMVhIUMtarw==
dependencies:
"@walletconnect/socket-transport" "^1.6.6"
"@walletconnect/types" "^1.6.6"
"@walletconnect/utils" "^1.6.6"
"@walletconnect/socket-transport" "^1.8.0"
"@walletconnect/types" "^1.8.0"
"@walletconnect/utils" "^1.8.0"

"@walletconnect/crypto@^1.0.1":
version "1.0.1"
resolved "https://registry.npmjs.org/@walletconnect/crypto/-/crypto-1.0.1.tgz"
integrity sha512-IgUReNrycIFxkGgq8YT9HsosCkhutakWD9Q411PR0aJfxpEa/VKJeaLRtoz6DvJpztWStwhIHnAbBoOVR72a6g==
"@walletconnect/crypto@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@walletconnect/crypto/-/crypto-1.0.2.tgz#3fcc2b2cde6f529a19eadd883dc555cd0e861992"
integrity sha512-+OlNtwieUqVcOpFTvLBvH+9J9pntEqH5evpINHfVxff1XIgwV55PpbdvkHu6r9Ib4WQDOFiD8OeeXs1vHw7xKQ==
dependencies:
"@walletconnect/encoding" "^1.0.0"
"@walletconnect/encoding" "^1.0.1"
"@walletconnect/environment" "^1.0.0"
"@walletconnect/randombytes" "^1.0.1"
"@walletconnect/randombytes" "^1.0.2"
aes-js "^3.1.2"
hash.js "^1.1.7"

"@walletconnect/encoding@^1.0.0":
version "1.0.0"
resolved "https://registry.npmjs.org/@walletconnect/encoding/-/encoding-1.0.0.tgz"
integrity sha512-4nkJFnS0QF5JdieG/3VPD1/iEWkLSZ14EBInLZ00RWxmC6EMZrzAeHNAWIgm+xP3NK0lqz+7lEsmWGtcl5gYnQ==
"@walletconnect/encoding@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@walletconnect/encoding/-/encoding-1.0.1.tgz#93c18ce9478c3d5283dbb88c41eb2864b575269a"
integrity sha512-8opL2rs6N6E3tJfsqwS82aZQDL3gmupWUgmvuZ3CGU7z/InZs3R9jkzH8wmYtpbq0sFK3WkJkQRZFFk4BkrmFA==
dependencies:
is-typedarray "1.0.0"
typedarray-to-buffer "3.1.5"
Expand All @@ -2421,63 +2421,63 @@
resolved "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.0.tgz"
integrity sha512-4BwqyWy6KpSvkocSaV7WR3BlZfrxLbJSLkg+j7Gl6pTDE+U55lLhJvQaMuDVazXYxcjBsG09k7UlH7cGiUI5vQ==

"@walletconnect/http-connection@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/http-connection/-/http-connection-1.6.6.tgz"
integrity sha512-V0UEnvMQPYBpD+8LAbuxN+i0dWVVfZ8XtmJymsBh2KyHLgKyHSsT5RwSCst132JGDV4/JP4HrHCs5t8KqSfEPw==
"@walletconnect/http-connection@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/http-connection/-/http-connection-1.8.0.tgz#c19fff5c179d5180d8b974faef2621bd012adb4e"
integrity sha512-IziEr3c53qsMromK7jz0EkbKDHlryRbxXdFR+xaG+S5nfxtUdAfjzlZabvczXdDCgmTij6KbNsZAjBMqCBzACw==
dependencies:
"@walletconnect/types" "^1.6.6"
"@walletconnect/utils" "^1.6.6"
"@walletconnect/types" "^1.8.0"
"@walletconnect/utils" "^1.8.0"
eventemitter3 "4.0.7"
xhr2-cookies "1.1.0"

"@walletconnect/iso-crypto@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/iso-crypto/-/iso-crypto-1.6.6.tgz"
integrity sha512-wRYgKvd8K3A9FVLn2c0cDh4+9OUHkqibKtwQJTJsz+ibPGgd+n5j1/FjnzDDRGb9T1+TtlwYF3ZswKyys3diVQ==
"@walletconnect/iso-crypto@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/iso-crypto/-/iso-crypto-1.8.0.tgz#44ddf337c4f02837c062dbe33fa7ab36789df451"
integrity sha512-pWy19KCyitpfXb70hA73r9FcvklS+FvO9QUIttp3c2mfW8frxgYeRXfxLRCIQTkaYueRKvdqPjbyhPLam508XQ==
dependencies:
"@walletconnect/crypto" "^1.0.1"
"@walletconnect/types" "^1.6.6"
"@walletconnect/utils" "^1.6.6"
"@walletconnect/crypto" "^1.0.2"
"@walletconnect/types" "^1.8.0"
"@walletconnect/utils" "^1.8.0"

"@walletconnect/jsonrpc-types@^1.0.0":
version "1.0.0"
resolved "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.0.tgz"
integrity sha512-11QXNq5H1PKZk7bP8SxgmCw3HRaDuPOVE+wObqEvmhc7OWYUZqfuaaMb+OXGRSOHL3sbC+XHfdeCxFTMXSFyng==
"@walletconnect/jsonrpc-types@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.1.tgz#a96b4bb2bcc8838a70e06f15c1b5ab11c47d8e95"
integrity sha512-+6coTtOuChCqM+AoYyi4Q83p9l/laI6NvuM2/AHaZFuf0gT0NjW7IX2+86qGyizn7Ptq4AYZmfxurAxTnhefuw==
dependencies:
keyvaluestorage-interface "^1.0.0"

"@walletconnect/jsonrpc-utils@^1.0.0":
version "1.0.0"
resolved "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.0.tgz"
integrity sha512-qUHbKUK6sHeHn67qtHZoLoYk5hS6x1arTPjKDRkY93/6Fx+ZmNIpdm1owX3l6aYueyegJ7mz43FpvYHUqJ8xcw==
"@walletconnect/jsonrpc-utils@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.3.tgz#5bd49865eef0eae48e8b45a06731dc18691cf8c7"
integrity sha512-3yb49bPk16MNLk6uIIHPSHQCpD6UAo1OMOx1rM8cW/MPEAYAzrSW5hkhG7NEUwX9SokRIgnZK3QuQkiyNzBMhQ==
dependencies:
"@walletconnect/environment" "^1.0.0"
"@walletconnect/jsonrpc-types" "^1.0.0"
"@walletconnect/jsonrpc-types" "^1.0.1"

"@walletconnect/mobile-registry@^1.4.0":
version "1.4.0"
resolved "https://registry.npmjs.org/@walletconnect/mobile-registry/-/mobile-registry-1.4.0.tgz"
integrity sha512-ZtKRio4uCZ1JUF7LIdecmZt7FOLnX72RPSY7aUVu7mj7CSfxDwUn6gBuK6WGtH+NZCldBqDl5DenI5fFSvkKYw==

"@walletconnect/qrcode-modal@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/qrcode-modal/-/qrcode-modal-1.6.6.tgz"
integrity sha512-wZorjpOIm6OhXKNvyH1YtpxfCUVcnuJxS8YbUeKWckGjS3tDPqUTbXWPlzFdMpNBrpY3j0B2XjLgVVQ2aUDX0w==
"@walletconnect/qrcode-modal@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/qrcode-modal/-/qrcode-modal-1.8.0.tgz#ddd6f5c9b7ee52c16adf9aacec2a3eac4994caea"
integrity sha512-BueaFefaAi8mawE45eUtztg3ZFbsAH4DDXh1UNwdUlsvFMjqcYzLUG0xZvDd6z2eOpbgDg2N3bl6gF0KONj1dg==
dependencies:
"@walletconnect/browser-utils" "^1.6.6"
"@walletconnect/browser-utils" "^1.8.0"
"@walletconnect/mobile-registry" "^1.4.0"
"@walletconnect/types" "^1.6.6"
"@walletconnect/types" "^1.8.0"
copy-to-clipboard "^3.3.1"
preact "10.4.1"
qrcode "1.4.4"

"@walletconnect/randombytes@^1.0.1":
version "1.0.1"
resolved "https://registry.npmjs.org/@walletconnect/randombytes/-/randombytes-1.0.1.tgz"
integrity sha512-YJTyq69i0PtxVg7osEpKfvjTaWuAsR49QEcqGKZRKVQWMbGXBZ65fovemK/SRgtiFRv0V8PwsrlKSheqzfPNcg==
"@walletconnect/randombytes@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@walletconnect/randombytes/-/randombytes-1.0.2.tgz#95c644251a15e6675f58fbffc9513a01486da49c"
integrity sha512-ivgOtAyqQnN0rLQmOFPemsgYGysd/ooLfaDA/ACQ3cyqlca56t3rZc7pXfqJOIETx/wSyoF5XbwL+BqYodw27A==
dependencies:
"@walletconnect/encoding" "^1.0.0"
"@walletconnect/encoding" "^1.0.1"
"@walletconnect/environment" "^1.0.0"
randombytes "^2.1.0"

Expand All @@ -2486,43 +2486,43 @@
resolved "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.0.tgz"
integrity sha512-QJzp/S/86sUAgWY6eh5MKYmSfZaRpIlmCJdi5uG4DJlKkZrHEF7ye7gA+VtbVzvTtpM/gRwO2plQuiooIeXjfg==

"@walletconnect/socket-transport@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/socket-transport/-/socket-transport-1.6.6.tgz"
integrity sha512-mugCEoeKTx75ogb5ROg/+LA3yGTsuRNcrYgrApceo7WNU9Z4dG8l6ycMPqrrFcODcrasq3NmXVWUYDv/CvrzSw==
"@walletconnect/socket-transport@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/socket-transport/-/socket-transport-1.8.0.tgz#9a1128a249628a0be11a0979b522fe82b44afa1b"
integrity sha512-5DyIyWrzHXTcVp0Vd93zJ5XMW61iDM6bcWT4p8DTRfFsOtW46JquruMhxOLeCOieM4D73kcr3U7WtyR4JUsGuQ==
dependencies:
"@walletconnect/types" "^1.6.6"
"@walletconnect/utils" "^1.6.6"
"@walletconnect/types" "^1.8.0"
"@walletconnect/utils" "^1.8.0"
ws "7.5.3"

"@walletconnect/types@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/types/-/types-1.6.6.tgz"
integrity sha512-op77cxexOmQQN36XB1sYouNTlBRV0Rup/2NYK8A1ffdwXa3a6HLHHdhBM7I/I9BVmRXoZ4+XoOnPKGGrYtlS3g==
"@walletconnect/types@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-1.8.0.tgz#3f5e85b2d6b149337f727ab8a71b8471d8d9a195"
integrity sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg==

"@walletconnect/utils@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/utils/-/utils-1.6.6.tgz"
integrity sha512-s2X/cVXiMDSEoWV6i7HPMbP1obXlzP7KLMrBo9OMabiJKnQEh6HSZ39WLswB2PHnl8Hp1Sr4BdRvhM5kCcYWRw==
"@walletconnect/utils@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-1.8.0.tgz#2591a197c1fa7429941fe428876088fda6632060"
integrity sha512-zExzp8Mj1YiAIBfKNm5u622oNw44WOESzo6hj+Q3apSMIb0Jph9X3GDIdbZmvVZsNPxWDL7uodKgZcCInZv2vA==
dependencies:
"@walletconnect/browser-utils" "^1.6.6"
"@walletconnect/encoding" "^1.0.0"
"@walletconnect/jsonrpc-utils" "^1.0.0"
"@walletconnect/types" "^1.6.6"
"@walletconnect/browser-utils" "^1.8.0"
"@walletconnect/encoding" "^1.0.1"
"@walletconnect/jsonrpc-utils" "^1.0.3"
"@walletconnect/types" "^1.8.0"
bn.js "4.11.8"
js-sha3 "0.8.0"
query-string "6.13.5"

"@walletconnect/web3-provider@^1.6.6":
version "1.6.6"
resolved "https://registry.npmjs.org/@walletconnect/web3-provider/-/web3-provider-1.6.6.tgz"
integrity sha512-8z4r9JCE0lKuZmVCPSdYnX114ckQ+oMfr9D8osRBtdyhvN9elwITMloUJfACDRelcuet94yEbXuDobQeBDDkkw==
dependencies:
"@walletconnect/client" "^1.6.6"
"@walletconnect/http-connection" "^1.6.6"
"@walletconnect/qrcode-modal" "^1.6.6"
"@walletconnect/types" "^1.6.6"
"@walletconnect/utils" "^1.6.6"
"@walletconnect/web3-provider@^1.8.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/web3-provider/-/web3-provider-1.8.0.tgz#e90d903f4c609b7158ecb5f0f41df121e93b56b5"
integrity sha512-lqqEO0oRmCehH+c8ZPk3iH7I7YtbzmkWd58/Or2AgWAl869JamzndKCD3sTlNsPRQLxxPpraHQqzur7uclLWvg==
dependencies:
"@walletconnect/client" "^1.8.0"
"@walletconnect/http-connection" "^1.8.0"
"@walletconnect/qrcode-modal" "^1.8.0"
"@walletconnect/types" "^1.8.0"
"@walletconnect/utils" "^1.8.0"
web3-provider-engine "16.0.1"

"@walletconnect/[email protected]", "@walletconnect/window-getters@^1.0.0":
Expand Down

0 comments on commit 96b5a53

Please sign in to comment.