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

add GITSER token #339

Open
wants to merge 122 commits into
base: add-oxy-token
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
e65a8e1
Add OXY token (#137)
nathanielparke Mar 11, 2021
467afee
simple update of the package seems to make it work (#138)
Arrowana Mar 11, 2021
c1fb770
Allow importing of base58 key format (#77)
moshthepitt Mar 11, 2021
b409d14
Decode unknown instruction accounts (#135)
Arrowana Mar 11, 2021
77a4a24
Decode create account with seed instructions
armaniferrante Mar 11, 2021
f5de51c
Don't show fingerprint next to non associated token accounts
armaniferrante Mar 12, 2021
2664ed7
Update Raydium pool tokens
nishadsingh1 Mar 13, 2021
754dd37
Sollet Chrome Extension v0 (#127)
jhlx Mar 14, 2021
bd3e841
Fix error displayed on auto-approved transactions (#145)
mschneider Mar 15, 2021
3cdab1c
fix bug with incorrect page
Mar 16, 2021
61b17cb
fix connection issue with sollet.io popup
Mar 17, 2021
eb02fc3
Add mango auto approve support (#148)
mschneider Mar 17, 2021
efbb932
refactor: move Popup sign transaction component to its own file SignT…
PaulBernier Mar 17, 2021
324b98d
Fix firefox popup
armaniferrante Mar 17, 2021
4a601d8
Use @solana/spl-token-registry (#141)
Arrowana Mar 17, 2021
3f9222e
Fix custom names and buttonref
armaniferrante Mar 18, 2021
78d5b47
feat: new rpc method 'sign' to sign arbitrary data and text messages …
PaulBernier Mar 18, 2021
b33f2aa
Catch errors when focusing parent for firefox
armaniferrante Mar 19, 2021
e1588a6
Migrate to native USDT (#139)
nathanielparke Mar 19, 2021
eaf6a2c
update with windows fix
Mar 29, 2021
0b25e43
fix 'keep unlocked' on extension
Mar 29, 2021
e39e6ef
upd parsing tx bug for sollet extension
Apr 1, 2021
39c9ac7
Ledger path parameterization (#158)
armaniferrante Apr 2, 2021
6995587
Fix popup window regressions (#159)
armaniferrante Apr 2, 2021
b4974cd
Upgrade @project-serum/serum to v0.13.33 (#171)
viveksb007 Apr 7, 2021
66fc4e2
Display token accounts less prominently (#173)
armaniferrante Apr 7, 2021
660a311
Remove delete and merge buttons
armaniferrante Apr 8, 2021
63ae7bd
Merge branch 'master' of github.com:project-serum/spl-token-wallet
Apr 9, 2021
dd9fb25
Merge accounts with token transfers (#174)
armaniferrante Apr 9, 2021
a4ed421
update sollet extension
Apr 9, 2021
8e9fe25
Merge branch 'master' of github.com:project-serum/spl-token-wallet
Apr 9, 2021
cf67838
bump version
Apr 9, 2021
543a0a8
fix 'sign' method in Chrome extension context (#177)
PaulBernier Apr 12, 2021
b315d2a
fix build errors
Apr 12, 2021
d368648
Use transfer checked instruction (#191)
armaniferrante Apr 15, 2021
401789f
Fix add token dialog
armaniferrante Apr 16, 2021
cc9d882
WUSDC flow (#197)
armaniferrante Apr 20, 2021
2758019
Fix wallet selection
armaniferrante Apr 21, 2021
fd4bc93
Return correct type for new wallets
armaniferrante Apr 21, 2021
ce8e8cc
Update README.md
jhlx Apr 22, 2021
850620b
Keep unlocked wallet in memory (#178)
jhlx Apr 26, 2021
98599a7
closes #181 unlock via enter key (#187)
gotjoshua Apr 26, 2021
afd9be9
add BRZ, COPE, and STEP to popular tokens list
Apr 26, 2021
ef996b5
Prompt user to re-enter seed phrase during wallet creation and log out
Apr 26, 2021
c4218f2
Hide delete button behind feature flag
armaniferrante Apr 26, 2021
92fad4b
add persistent background
May 3, 2021
cf2279d
bump version to 0.2.7
May 3, 2021
42d2ea7
Disable small btc swaps and misc updates
armaniferrante May 1, 2021
a666b17
Display invalid mnemonic warning
armaniferrante May 6, 2021
28207bf
Change mainnet beta backup url
armaniferrante May 18, 2021
f7ab377
Allow for disabling of ERC20 withdrawals by mint (#261)
nathanielparke May 19, 2021
63dc54e
Customize erc20 withdrawal behavior (#263)
nathanielparke May 20, 2021
958cf5d
Add mnemonic download setup requirement (#269)
May 24, 2021
73c0e95
Disable some mints
armaniferrante Jun 1, 2021
80b425c
Add null mint check for disabled deposit mints
armaniferrante Jun 1, 2021
f948239
Auto approve support for MANGO_PROGRAM_ID_V2 (#276)
dafyddd Jun 2, 2021
f15c15a
FTX Pay integration (#255)
Jun 3, 2021
9c9f1d4
Add swap button (#256)
armaniferrante Jun 5, 2021
28232ff
fix swap bug on non-mainnet endpoints (#285)
dr497 Jun 6, 2021
3a8ea40
Fix token infos (#287)
armaniferrante Jun 7, 2021
c871658
Switch ledger transport to HID (#289)
armaniferrante Jun 8, 2021
a70cced
Validate secret keys (#290)
armaniferrante Jun 8, 2021
70be985
Use Uint8array when doing secret key validation
armaniferrante Jun 8, 2021
d405639
update explorer to solscan.io (#292)
thanhnguyennguyen Jun 9, 2021
3adbe0d
Update text Solscan (#293)
thanhnguyennguyen Jun 9, 2021
68d477d
Bump @project-serum/swap-ui v0.1.1
armaniferrante Jun 10, 2021
83ba227
Bump @project-serum/swap-ui v0.1.2
armaniferrante Jun 11, 2021
9baece0
Bump @project-serum/swap-ui v0.1.3
armaniferrante Jun 11, 2021
a9c63fd
fix get multiple accounts call (#298)
keemy Jun 14, 2021
981804a
Adjust UI elements for Sollet Extension release
Jun 15, 2021
19cacc1
Format swap-ui for extension
armaniferrante Jun 15, 2021
d2c73e3
Bmp @project-serum/swap-ui v0.1.5
armaniferrante Jun 16, 2021
e1abd5e
Hide swap-ui tab bar for extension (#301)
armaniferrante Jun 16, 2021
96b5b7f
bump sollet extesion version to 0.3.0
Jun 16, 2021
7035297
Update backup url
armaniferrante Jun 17, 2021
48348f4
Bump @project-serum/swap-ui v0.1.7
armaniferrante Jun 23, 2021
32ba45d
Bump @project-serum/swap-ui v0.1.8
armaniferrante Jun 23, 2021
9fa5c4e
Add all required bits for stake instruction decoding (#312)
Arrowana Jun 25, 2021
b5e7bc1
Bump @project-serum/swap-ui v0.1.10
armaniferrante Jun 24, 2021
b073d88
Add Solrise Finance (SLRS) token (#314)
anbud Jun 25, 2021
74fd5da
Token ix parsing fix (#316)
Arrowana Jun 26, 2021
914a1d4
Bump @project-serum/swap-ui v0.1.11
armaniferrante Jun 28, 2021
0909629
add solana name service (#320)
dr497 Jul 1, 2021
3496b55
Add SAMO to popular tokens (#327)
praskoson Jul 6, 2021
bb2c3c8
Add warning for aux accounts (#333)
armaniferrante Jul 8, 2021
5d72776
change package (#334)
dr497 Jul 8, 2021
81d045e
Send to ata when available (#335)
armaniferrante Jul 13, 2021
ee796ae
add domains name support (#336)
dr497 Jul 13, 2021
aa0fb9f
Add banner
armaniferrante Jul 15, 2021
0c7da6e
fix mint token issue (#351)
yangli-io Jul 27, 2021
eda316d
Switch to web3.js getProgramAccounts: Fix for devnet and ultimately m…
Arrowana Jul 30, 2021
c887be8
Add copy on click on account, and show shortened address (#353)
Arrowana Aug 4, 2021
ec9bc85
Update Sollet Extension
Aug 6, 2021
a8d2d3b
Fix ledger breakage
armaniferrante Aug 6, 2021
8328877
@project-serum/swap-ui v0.2.2
armaniferrante Aug 8, 2021
f30c9ee
added stSOL to popular token list (#372)
hritique Aug 23, 2021
66fc1c8
Wallet suggestion dialog
armaniferrante Aug 24, 2021
c2090ff
Use list item for suggestion dialog
armaniferrante Aug 24, 2021
4b9bd70
Toggle token details
armaniferrante Aug 20, 2021
4b555ff
Add ignore wallet suggestion button
armaniferrante Aug 26, 2021
7f6771d
Custom clusters (#384)
Aug 31, 2021
634fdd4
Update swap button
armaniferrante Sep 3, 2021
3266b33
properly print transactions with empty data (#389)
2501babe Sep 4, 2021
926af80
Ignore swap info coins
armaniferrante Sep 15, 2021
165b6fe
add Diffie-Hellman
dr497 Oct 13, 2021
7f66a52
lint
dr497 Oct 15, 2021
2a32bc8
Bump swap dep
armaniferrante Oct 22, 2021
6d8799e
Update README.md
armaniferrante Jan 13, 2022
617db9c
Remove debug buttons
armaniferrante Jan 18, 2022
77b65d4
disable eth
armaniferrante Feb 14, 2022
0a4c2a0
add subdomain resolution (#441)
dr497 Feb 17, 2022
022f89e
Add security warning
Jun 17, 2022
1f43b68
get ETH behind localStorage variable and remove Bonfida price API
jhlx Sep 30, 2022
9007bf4
added wormhole additive tab
sayantank Oct 20, 2022
7f0d36f
nit
sayantank Oct 20, 2022
6af088e
Merge pull request #452 from project-serum/wormhole-tab
sayantank Oct 23, 2022
3af2d63
Revert "chore: added wormhole tab for bridge"
sayantank Oct 23, 2022
ee016ff
Merge pull request #453 from project-serum/revert-452-wormhole-tab
sayantank Oct 23, 2022
02a3235
add backpack link
armaniferrante Oct 29, 2022
da89362
add link to readme
armaniferrante Oct 29, 2022
493f2ad
Revert "Revert "chore: added wormhole tab for bridge""
sayantank Nov 2, 2022
125d59f
Merge pull request #454 from project-serum/revert-453-revert-452-worm…
sayantank Nov 2, 2022
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ yarn-error.log*

.idea
.eslintcache

# generate with `build:extension` script
extension/build/*
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js: 10
node_js: 14
dist: bionic
cache: yarn
script: yarn build
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# SPL Token Wallet

Note. This repository is used as a developer tool. Non security related issues and PRs will not be actively supported. For a wallet, it's recommended to use [Backpack](https://backpack.app/download).

Example Solana wallet with support for [SPL tokens](https://spl.solana.com/token) and Serum integration.

See [sollet.io](https://www.sollet.io) for a demo.
See [sollet.io](https://www.sollet.io) or the [Sollet Chrome Extension](https://chrome.google.com/webstore/detail/sollet/fhmfendgdocmcbmfikdcogofphimnkno) for a demo.

Wallet keys are stored in `localStorage`, optionally encrypted by a password.

Expand Down
77 changes: 77 additions & 0 deletions extension/src/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
const responseHandlers = new Map();
let unlockedMnemonic = '';

function launchPopup(message, sender, sendResponse) {
const searchParams = new URLSearchParams();
searchParams.set('origin', sender.origin);
searchParams.set('network', message.data.params.network);
searchParams.set('request', JSON.stringify(message.data));

// TODO consolidate popup dimensions
chrome.windows.getLastFocused((focusedWindow) => {
chrome.windows.create({
url: 'index.html#' + searchParams.toString(),
type: 'popup',
width: 375,
height: 600,
top: focusedWindow.top,
left: focusedWindow.left + (focusedWindow.width - 375),
setSelfAsOpener: true,
focused: true,
});
});

responseHandlers.set(message.data.id, sendResponse);
}

function handleConnect(message, sender, sendResponse) {
chrome.storage.local.get('connectedWallets', (result) => {
const connectedWallet = (result.connectedWallets || {})[sender.origin];
if (!connectedWallet) {
launchPopup(message, sender, sendResponse);
} else {
sendResponse({
method: 'connected',
params: {
publicKey: connectedWallet.publicKey,
autoApprove: connectedWallet.autoApprove,
},
id: message.data.id,
});
}
});
}

function handleDisconnect(message, sender, sendResponse) {
chrome.storage.local.get('connectedWallets', (result) => {
delete result.connectedWallets[sender.origin];
chrome.storage.local.set(
{ connectedWallets: result.connectedWallets },
() => sendResponse({ method: 'disconnected', id: message.data.id }),
);
});
}

chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.channel === 'sollet_contentscript_background_channel') {
if (message.data.method === 'connect') {
handleConnect(message, sender, sendResponse);
} else if (message.data.method === 'disconnect') {
handleDisconnect(message, sender, sendResponse);
} else {
launchPopup(message, sender, sendResponse);
}
// keeps response channel open
return true;
} else if (message.channel === 'sollet_extension_background_channel') {
const responseHandler = responseHandlers.get(message.data.id);
responseHandlers.delete(message.data.id);
responseHandler(message.data);
} else if (message.channel === 'sollet_extension_mnemonic_channel') {
if (message.method === 'set') {
unlockedMnemonic = message.data;
} else if (message.method === 'get') {
sendResponse(unlockedMnemonic);
}
}
});
24 changes: 24 additions & 0 deletions extension/src/contentscript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const container = document.head || document.documentElement;
const scriptTag = document.createElement('script');
scriptTag.setAttribute('async', 'false');
scriptTag.src = chrome.runtime.getURL('script.js');
container.insertBefore(scriptTag, container.children[0]);
container.removeChild(scriptTag);

window.addEventListener('sollet_injected_script_message', (event) => {
chrome.runtime.sendMessage(
{
channel: 'sollet_contentscript_background_channel',
data: event.detail,
},
(response) => {
// Can return null response if window is killed
if (!response) {
return;
}
window.dispatchEvent(
new CustomEvent('sollet_contentscript_message', { detail: response }),
);
},
);
});
42 changes: 42 additions & 0 deletions extension/src/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "Sollet",
"description": "Solana SPL Token Wallet",
"version": "0.3.1",
"browser_action": {
"default_popup": "index.html",
"default_title": "Open the popup"
},
"manifest_version": 2,
"icons": {
"16": "favicon.ico",
"192": "logo192.png",
"512": "logo512.png"
},
"background": {
"persistent": true,
"scripts": [
"background.js"
]
},
"permissions": [
"storage"
],
"content_scripts": [
{
"matches": [
"file://*/*",
"http://*/*",
"https://*/*"
],
"js": [
"contentscript.js"
],
"run_at": "document_start",
"all_frames": true
}
],
"web_accessible_resources": [
"script.js"
],
"content_security_policy": "script-src 'self' 'sha256-ek+jXksbUr00x+EdLLqiv69t8hATh5rPjHVvVVGA9ms='; object-src 'self'"
}
15 changes: 15 additions & 0 deletions extension/src/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
window.sollet = {
postMessage: (message) => {
const listener = (event) => {
if (event.detail.id === message.id) {
window.removeEventListener('sollet_contentscript_message', listener);
window.postMessage(event.detail);
}
};
window.addEventListener('sollet_contentscript_message', listener);

window.dispatchEvent(
new CustomEvent('sollet_injected_script_message', { detail: message }),
);
},
};
Binary file added extension/src/sollet128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extension/src/sollet_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extension/src/sollet_screenshot_1280x800.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 25 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ledgerhq/hw-transport-webusb": "^5.34.0",
"@material-ui/core": "^4.11.2",
"@bonfida/spl-name-service": "^0.1.24",
"@ledgerhq/hw-transport-webhid": "^5.51.1",
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
"@project-serum/serum": "^0.13.24",
"@solana/web3.js": "^0.87.2",
"@material-ui/lab": "^4.0.0-alpha.58",
"@project-serum/anchor": "^0.7.0",
"@project-serum/serum": "^0.13.33",
"@project-serum/swap-ui": "^0.2.4",
"@project-serum/token": "^0.0.1-alpha.3",
"@solana/spl-token-registry": "^0.2.102",
"@solana/web3.js": "^1.17.0",
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.2",
"@testing-library/user-event": "^12.6.0",
Expand All @@ -23,10 +29,13 @@
"buffer-layout": "^1.2.0",
"ed25519-hd-key": "^1.2.0",
"immutable-tuple": "^0.4.10",
"material-ui-popup-state": "^1.8.3",
"mdi-material-ui": "^6.21.0",
"notistack": "^1.0.2",
"qrcode.react": "^1.0.0",
"react": "^17.0.1",
"react-async-hook": "^3.6.2",
"react-copy-to-clipboard": "^5.0.3",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"tweetnacl": "^1.0.3",
Expand All @@ -37,14 +46,23 @@
"predeploy": "git pull --ff-only && yarn && yarn build",
"deploy": "gh-pages -d build",
"fix": "run-s fix:*",
"fix:prettier": "prettier \"src/**/*.js\" --write",
"fix:prettier": "prettier \"src/**/*.js\" \"extension/src/*.js\" --write",
"start": "react-scripts start",
"build": "react-scripts build",
"build:extension": "yarn build && cp -a ./build/. ./extension/build/ && yarn build:extension-scripts",
"build:extension-scripts": "cp -a ./extension/src/. ./extension/build/.",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
"env": {
"browser": true,
"es6": true,
"webextensions": true
},
"extends": [
"react-app"
]
},
"jest": {
"transformIgnorePatterns": [
Expand Down Expand Up @@ -73,6 +91,7 @@
}
},
"devDependencies": {
"@types/react-copy-to-clipboard": "^5.0.1",
"gh-pages": "^3.1.0",
"git-format-staged": "^2.1.0",
"husky": "^4.3.6",
Expand Down
Loading