Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
change sample code for 3.0.0 wallet release
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstevens19 committed Jan 27, 2021
1 parent 069562d commit c9a553a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

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

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": "vue-cli-service lint"
},
"dependencies": {
"@funfair-tech/wallet-sdk": "^2.2.0",
"@funfair-tech/wallet-sdk": "^3.0.3",
"@funfair-tech/wallet-vue": "^1.1.0",
"core-js": "^3.6.5",
"rxjs": "^6.6.3",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= htmlWebpackPlugin.options.title %></title>
<script
src="https://wallet.funfair.io/assets/sdk/fun-wallet-sdk.js?appId=0x238fb86cd351a3711ba4917ad63dd6fcb198f7048a6225f480fe500e42dca975"
src="https://wallet.funfair.io/assets/sdk/fun-wallet-sdk.js?appId=0x1b084986077d1aedfa1d92318fdcc7d1621fbc92deb390269b94226fd79c0ce6"
type="text/JavaScript"
></script>
</head>
Expand Down
9 changes: 5 additions & 4 deletions src/services/wallet-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function login() {
}

export function logout() {
window.funwallet.sdk.logout();
window.funwallet.sdk.auth.logout();
isAuthenticated$.next(false);
}

Expand All @@ -88,7 +88,7 @@ function web3Instance() {
}

export async function signAMessage(messageText) {
const ethereumAddress = await window.funwallet.sdk.ethereumAddress();
const ethereumAddress = await window.funwallet.sdk.eth.address();

const result = await web3Instance().eth.personal.sign(
messageText,
Expand All @@ -99,7 +99,8 @@ export async function signAMessage(messageText) {
}

export async function sendTransaction(tx) {
const ethereumAddress = await window.funwallet.sdk.ethereumAddress();
const ethereumAddress = await window.funwallet.sdk.eth.address();

tx.from = ethereumAddress;

web3Instance()
Expand All @@ -113,5 +114,5 @@ export async function sendTransaction(tx) {
}

export async function openKycProcess() {
await window.funwallet.sdk.kycModalOpen();
await window.funwallet.sdk.kyc.start();
}

0 comments on commit c9a553a

Please sign in to comment.