Skip to content

Commit

Permalink
Merge pull request #169 from perawallet/upgrade-algosdk
Browse files Browse the repository at this point in the history
Upgrade `algosdk` to v3
  • Loading branch information
yigitguler authored Jan 8, 2025
2 parents 92659d7 + 382af33 commit 60987f9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
25 changes: 12 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": "1.3.5",
"version": "1.4.0",
"name": "@perawallet/connect",
"description": "JavaScript SDK for integrating Pera Wallet to web applications.",
"main": "dist/index.js",
"module": "dist/index.js",
"scripts": {
"dev": "./node_modules/.bin/rollup -c -w",
"build": "npm run eslint && ./node_modules/.bin/rollup -c",
Expand Down Expand Up @@ -43,7 +43,7 @@
"qr-code-styling": "1.6.0-rc.1"
},
"peerDependencies": {
"algosdk": "^2.1.0"
"algosdk": "^3.0.0"
},
"types": "./dist/index.d.ts",
"repository": {
Expand Down
3 changes: 1 addition & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default [
},
output: {
dir: "dist",
format: "cjs",
format: "esm",
name: "PeraConnect",
globals: {
"@walletconnect/client": "WalletConnect",
Expand All @@ -32,7 +32,6 @@ export default [
"@evanhahn/lottie-web-light",
"bowser",
"qr-code-styling",
"bufferutil",
"utf-8-validate"
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import {Buffer} from 'buffer';

if (typeof window !== "undefined") {
// Pollyfill for Buffer
(window as any).global = window;
// eslint-disable-next-line @typescript-eslint/no-var-requires
window.Buffer = window.Buffer || require("buffer").Buffer;
window.Buffer = window.Buffer || Buffer;

import("./App");
}


import PeraWalletConnect from "./PeraWalletConnect";
import {closePeraWalletSignTxnToast} from "./modal/peraWalletConnectModalUtils";

Expand Down

0 comments on commit 60987f9

Please sign in to comment.