Skip to content

Commit

Permalink
Merge pull request #7 from perawallet/feat/asset-txns
Browse files Browse the repository at this point in the history
feat: Add asset txn forms
  • Loading branch information
yasincaliskan authored Oct 3, 2023
2 parents 5286d75 + 252655d commit 3494b9e
Show file tree
Hide file tree
Showing 8 changed files with 357 additions and 51 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

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

22 changes: 8 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"homepage": "https://perawallet.github.io/pera-demo-dapp/",
"private": true,
"dependencies": {
"@hipo/react-ui-toolkit": "^1.0.0-beta",
"@perawallet/connect": "^1.3.2",
"@hipo/react-ui-toolkit": "1.0.0-beta",
"@perawallet/connect": "^1.3.3",
"@perawallet/onramp": "^1.1.1",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.4",
Expand All @@ -31,6 +31,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"prettier": "^2.5.1",
"react-error-overlay": "^6.0.9",
"sass": "1.56.1",
"stylelint": "^13.12.0",
"stylelint-no-unsupported-browser-features": "^4.1.4",
Expand All @@ -52,18 +53,11 @@
"eslintIgnore": [
"signTxnUtils.tsx"
],
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
],
"keywords": [],
"description": ""
}
14 changes: 9 additions & 5 deletions src/core/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,15 @@ function Home() {
}

async function handleConnectWalletClick() {
const newAccounts = await peraWallet.connect();

handleSetLog("Connected to Pera Wallet");

setAccountAddress(newAccounts[0]);
try {
const newAccounts = await peraWallet.connect();

handleSetLog("Connected to Pera Wallet");

setAccountAddress(newAccounts[0]);
} catch (e) {
console.log(e)
}
}

function handleDisconnectWalletClick() {
Expand Down
1 change: 1 addition & 0 deletions src/core/home/sign-txn/SignTxn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ function SignTxn({
}
} catch (error) {
handleSetLog(`${error}`);
console.log(error);
} finally {
setIsRequestPending(false);
refecthAccountDetail();
Expand Down
Loading

0 comments on commit 3494b9e

Please sign in to comment.