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:swaps issue #11

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@heliofi/react": "3.3.3",
"@heliofi/react": "3.6.0-alpha.0",
"next": "12.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
7 changes: 5 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ const Home: NextPage = () => {
const [paymentRequest, setPaymentRequest] = useState<Paylink | null>(null);
const [isShownCustom, setIsShownCustom] = useState<boolean>(false);

const customApiUrl = cluster == ClusterType.Devnet ? 'https://dev.api.hel.io/v1' : 'https://api.hel.io/v1'

const sdk = useMemo(() => {
return new HelioSDK({ cluster })
}, [cluster]);
return new HelioSDK({ cluster, customApiUrl })
}, [cluster, customApiUrl]);

useEffect( () => {
const fetchPaylink = async () => {
Expand Down Expand Up @@ -269,6 +271,7 @@ const Home: NextPage = () => {
<div className={styles.paybutton}>
<HelioPay
cluster={cluster}
customApiUrl={customApiUrl}
payButtonTitle="Buy Coffee"
paymentRequestId={paymentRequestId}
onSuccess={function (event): void {
Expand Down
104 changes: 36 additions & 68 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2853,16 +2853,16 @@
resolved "https://registry.npmjs.org/@heliofi/helio-icons/-/helio-icons-1.0.5.tgz"
integrity sha512-e5aztRvr62l8LEIGvUmZ5Nu5oKuvNcUE7PhDwN3LBLqeVU+NR7TtiIcaboiFPP2ZHhWGPkAoDbeMXWYxWPu4FA==

"@heliofi/react@3.3.3":
version "3.3.3"
resolved "https://registry.yarnpkg.com/@heliofi/react/-/react-3.3.3.tgz#fc91957a2b56a900cf75b201587b624a86654e90"
integrity sha512-3ybbT0b97yNg1QaKbLqeb3k9aGmeg3Z7N6BbDIdfRc1adiJD96lqc4r8y5p1Dy5l5/tfaqWr45Omg0Hx2jg2aw==
"@heliofi/react@3.6.0-alpha.0":
version "3.6.0-alpha.0"
resolved "https://registry.yarnpkg.com/@heliofi/react/-/react-3.6.0-alpha.0.tgz#950e7a25f353b5ef24e1b40a9f47cf9e8195d724"
integrity sha512-H7F/MnJ66iDmiQiNBwU9Vpn3QvivlWTCfZdZRwFoe3dfd6Ya+sVTu2hKZV3ecvMO6GswSI/MeUUdFYiN5AVGKg==
dependencies:
"@aws-amplify/api-graphql" "^2.3.12"
"@heliofi/common" "0.1.195"
"@heliofi/helio-icons" "^1.0.5"
"@heliofi/sdk" "^0.1.8"
"@heliofi/solana-adapter" "3.1.1-alpha"
"@heliofi/sdk" "^0.4.0-alpha.0"
"@heliofi/solana-adapter" "^3.3.10-alpha.0"
"@popperjs/core" "^2.11.7"
"@project-serum/anchor" "^0.25.0"
"@solana/spl-token" "^0.3.6"
Expand All @@ -2878,6 +2878,7 @@
downshift "^6.1.7"
formik "^2.2.9"
jest "^28.1.1"
json5 "^2.2.2"
jwt-decode "^3.1.2"
react "^18.2.0"
react-dom "^18.2.0"
Expand All @@ -2891,13 +2892,13 @@
tweetnacl "^1.0.3"
yup "^0.32.11"

"@heliofi/sdk@^0.1.8":
version "0.1.8"
resolved "https://registry.yarnpkg.com/@heliofi/sdk/-/sdk-0.1.8.tgz#cb5f63ca622c35ab37cbda02d41b7d465a301dd2"
integrity sha512-zN+e1aT+GKjMqE0ZDGRQTuqML/VB1wos8Og6WYPBwx+lqeaD7FVDHzDK03i+nAYutvTFawLXMUj+pedIIK6Fwg==
"@heliofi/sdk@^0.4.0-alpha.0":
version "0.4.0-alpha.0"
resolved "https://registry.yarnpkg.com/@heliofi/sdk/-/sdk-0.4.0-alpha.0.tgz#dfa3ca9b46ead87b2668d0392e35bebcf5d4c2ab"
integrity sha512-0f4lyCuELjcjb4GtnSGXeLkaweA19XjGVe2YfVZwbUpiEV7FDDYc2rmHJTJ1ElAOBYZhl35HmE7R+1Ac9hF+qw==
dependencies:
"@heliofi/common" "0.1.195"
"@heliofi/solana-adapter" "3.1.1-alpha"
"@heliofi/solana-adapter" "^3.3.10-alpha.0"
"@project-serum/anchor" "^0.25.0"
"@solana/wallet-adapter-react" "^0.15.20"
"@solana/web3.js" "^1.66.2"
Expand All @@ -2906,17 +2907,18 @@
tweetnacl "^1.0.3"
yarn "^1.22.19"

"@heliofi/solana-adapter@3.1.1-alpha":
version "3.1.1-alpha"
resolved "https://registry.npmjs.org/@heliofi/solana-adapter/-/solana-adapter-3.1.1-alpha.tgz"
integrity sha512-eDWlzhib82g49ooSsqgngd5ThWvVy94cOtxyUIhH+g0icULBD6M+LkL30aIvsW/kAw5bqBankLvXjXb0TNt4Kw==
"@heliofi/solana-adapter@^3.3.10-alpha.0":
version "3.3.10-alpha.0"
resolved "https://registry.yarnpkg.com/@heliofi/solana-adapter/-/solana-adapter-3.3.10-alpha.0.tgz#caef81bbdc15b227579d81d6747a427c4cbf5d96"
integrity sha512-eQ8JNCMM7Rz+0tKv0uYGTXmYOC7dr8bGnOov2tBgdj9fkx1tko9w56eoWqZYKKMXOd6FHzyFScaTfyMECKxMZg==
dependencies:
"@project-serum/anchor" "^0.25.0"
"@sideway/formula" "^3.0.1"
"@solana/spl-token" "^0.2.0"
"@solana/wallet-adapter-react" "^0.15.20"
"@solana/web3.js" "^1.66.2"
bs58 "^5.0.0"
jsonwebtoken "^8.5.1"
jsonwebtoken "^9.0.0"
tweetnacl "^1.0.3"

"@humanwhocodes/config-array@^0.9.2":
Expand Down Expand Up @@ -7154,6 +7156,11 @@ json5@^2.2.1:
resolved "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==

json5@^2.2.2:
version "2.2.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==

jsonify@~0.0.0:
version "0.0.1"
resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz"
Expand All @@ -7164,21 +7171,15 @@ jsonparse@^1.2.0:
resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz"
integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==

jsonwebtoken@^8.5.1:
version "8.5.1"
resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz"
integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==
jsonwebtoken@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz#d0faf9ba1cc3a56255fe49c0961a67e520c1926d"
integrity sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==
dependencies:
jws "^3.2.2"
lodash.includes "^4.3.0"
lodash.isboolean "^3.0.3"
lodash.isinteger "^4.0.4"
lodash.isnumber "^3.0.3"
lodash.isplainobject "^4.0.6"
lodash.isstring "^4.0.1"
lodash.once "^4.0.0"
lodash "^4.17.21"
ms "^2.1.1"
semver "^5.6.0"
semver "^7.3.8"

jsqr@^1.2.0:
version "1.4.0"
Expand Down Expand Up @@ -7286,36 +7287,6 @@ lodash-es@^4.17.21:
resolved "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz"
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==

lodash.includes@^4.3.0:
version "4.3.0"
resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz"
integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==

lodash.isboolean@^3.0.3:
version "3.0.3"
resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz"
integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==

lodash.isinteger@^4.0.4:
version "4.0.4"
resolved "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz"
integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==

lodash.isnumber@^3.0.3:
version "3.0.3"
resolved "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz"
integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==

lodash.isplainobject@^4.0.6:
version "4.0.6"
resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz"
integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==

lodash.isstring@^4.0.1:
version "4.0.1"
resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz"
integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==

[email protected]:
version "4.1.2"
resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz"
Expand All @@ -7326,11 +7297,6 @@ lodash.merge@^4.6.2:
resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==

lodash.once@^4.0.0:
version "4.1.1"
resolved "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz"
integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==

lodash@^4.17.11, lodash@^4.17.20, lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
Expand Down Expand Up @@ -8339,16 +8305,18 @@ [email protected], semver@^7.3.5, semver@^7.3.7:
dependencies:
lru-cache "^6.0.0"

semver@^5.6.0:
version "5.7.1"
resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==

semver@^6.0.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@^7.3.8:
version "7.5.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec"
integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==
dependencies:
lru-cache "^6.0.0"

setimmediate@^1.0.5:
version "1.0.5"
resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz"
Expand Down