upgrade mango client (#271)

* upgrade mango client

* fix prettier
This commit is contained in:
Adrian Brzeziński 2022-05-16 17:51:17 +02:00 committed by GitHub
parent 0571c2fa00
commit 3bee514052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 22 deletions

View File

@ -359,28 +359,32 @@ const WithdrawModal: FunctionComponent<WithdrawModalProps> = ({
</Select.Option>
))}
</Select>
{ withdrawTokenSymbol != 'LUNA' ? (<div className="jusitfy-between mt-4 flex items-center rounded-md bg-th-bkg-3 p-2 text-th-fgd-1">
<div className="text-fgd-1 flex items-center pr-4">
<span>{t('borrow-funds')}</span>
<Tooltip content={t('tooltip-interest-charged')}>
<InformationCircleIcon
className={`ml-2 h-5 w-5 cursor-help text-th-primary`}
/>
</Tooltip>
{withdrawTokenSymbol != 'LUNA' ? (
<div className="jusitfy-between mt-4 flex items-center rounded-md bg-th-bkg-3 p-2 text-th-fgd-1">
<div className="text-fgd-1 flex items-center pr-4">
<span>{t('borrow-funds')}</span>
<Tooltip content={t('tooltip-interest-charged')}>
<InformationCircleIcon
className={`ml-2 h-5 w-5 cursor-help text-th-primary`}
/>
</Tooltip>
</div>
<Switch
checked={includeBorrow}
className="ml-auto"
onChange={(checked) => handleIncludeBorrowSwitch(checked)}
/>
</div>
<Switch
checked={includeBorrow}
className="ml-auto"
onChange={(checked) => handleIncludeBorrowSwitch(checked)}
/>
</div>) : null }
) : null}
<div className="flex justify-between pt-4">
<Label>{t('amount')}</Label>
<LinkButton
className="mb-1.5"
onClick={() => setInputAmount(maxAmount.toString())}
>
{includeBorrow && withdrawTokenSymbol != 'LUNA' ? t('max-with-borrow') : t('max')}
{includeBorrow && withdrawTokenSymbol != 'LUNA'
? t('max-with-borrow')
: t('max')}
</LinkButton>
</div>
<div className="flex">

View File

@ -17,7 +17,7 @@
"analyze": "ANALYZE=true yarn build"
},
"dependencies": {
"@blockworks-foundation/mango-client": "^3.4.5",
"@blockworks-foundation/mango-client": "^3.4.7",
"@headlessui/react": "^0.0.0-insiders.2dbc38c",
"@heroicons/react": "^1.0.0",
"@jup-ag/react-hook": "^1.0.0-beta.22",

View File

@ -1008,16 +1008,16 @@
"@babel/helper-validator-identifier" "^7.16.7"
to-fast-properties "^2.0.0"
"@blockworks-foundation/mango-client@^3.4.5":
version "3.4.5"
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-3.4.5.tgz#9ba8e8450e7a834c4067885eef2c21dc1a7d4fb7"
integrity sha512-RQ8WAcUMKtV72TGZ3qLFqcZW17WbDyDMcnCZrzSHp0rWpuThXcKb17/YBJY7TugVRvc6JnV1aJtlibI/oF15Gw==
"@blockworks-foundation/mango-client@^3.4.7":
version "3.4.7"
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-3.4.7.tgz#5411ca4aae738bc9a277d88c15f6aa162f47aaf0"
integrity sha512-TBbWn+adQdXu+6UUiZqWD+LmZsDy9DhRkSaaxKDwC0q1VDLvXbO6Sj9XpOmw6ZAp7bgC/9uKtn9macJotppn3Q==
dependencies:
"@project-serum/anchor" "^0.21.0"
"@project-serum/serum" "0.13.55"
"@project-serum/sol-wallet-adapter" "^0.2.0"
"@solana/spl-token" "^0.1.6"
"@solana/web3.js" "^1.31.0"
"@solana/web3.js" "^1.37.1"
big.js "^6.1.1"
bn.js "^5.1.0"
buffer-layout "^1.2.1"
@ -1700,6 +1700,16 @@
"@sentry/types" "6.19.2"
tslib "^1.9.3"
"@solana/buffer-layout-utils@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca"
integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==
dependencies:
"@solana/buffer-layout" "^4.0.0"
"@solana/web3.js" "^1.32.0"
bigint-buffer "^1.1.5"
bignumber.js "^9.0.1"
"@solana/buffer-layout@3.0.0", "@solana/buffer-layout@^3.0.0", "@solana/buffer-layout@^4.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz#b9353caeb9a1589cb77a1b145bcb1a9a93114326"
@ -2004,6 +2014,28 @@
superstruct "^0.14.2"
tweetnacl "^1.0.0"
"@solana/web3.js@^1.37.1":
version "1.42.0"
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.42.0.tgz#296e4bbab1fbfc198b3e9c3d94016c3876eb6a2c"
integrity sha512-QqGh5DWzrgsWRx4sCPDQIm3390b7buPR16tZI61slQaQwJ2ymrSXPQCe4PPTJEIlzGjCV3dkn2vpT2R32BfK2Q==
dependencies:
"@babel/runtime" "^7.12.5"
"@ethersproject/sha2" "^5.5.0"
"@solana/buffer-layout" "^4.0.0"
"@solana/buffer-layout-utils" "^0.2.0"
bn.js "^5.0.0"
borsh "^0.7.0"
bs58 "^4.0.1"
buffer "6.0.1"
cross-fetch "^3.1.4"
fast-stable-stringify "^1.0.0"
jayson "^3.4.4"
js-sha3 "^0.8.0"
rpc-websockets "^7.4.2"
secp256k1 "^4.0.2"
superstruct "^0.14.2"
tweetnacl "^1.0.0"
"@solflare-wallet/pfp@^0.0.6":
version "0.0.6"
resolved "https://registry.yarnpkg.com/@solflare-wallet/pfp/-/pfp-0.0.6.tgz#0dc360e7ebb11029977f5cd5593b5dc5e6074bab"
@ -2809,7 +2841,14 @@ big.js@^6.1.1:
resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.1.1.tgz#63b35b19dc9775c94991ee5db7694880655d5537"
integrity sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==
bignumber.js@^9.0.2:
bigint-buffer@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442"
integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==
dependencies:
bindings "^1.3.0"
bignumber.js@^9.0.1, bignumber.js@^9.0.2:
version "9.0.2"
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673"
integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==
@ -2819,6 +2858,13 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
bindings@^1.3.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
dependencies:
file-uri-to-path "1.0.0"
blakejs@^1.1.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814"
@ -3986,6 +4032,11 @@ fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.1.1:
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884"
integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==
fast-stable-stringify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313"
integrity sha1-XFVDRisiru79NtBbNOUceMuG0xM=
fastq@^1.6.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c"
@ -4000,6 +4051,11 @@ file-entry-cache@^6.0.1:
dependencies:
flat-cache "^3.0.4"
file-uri-to-path@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
fill-range@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"