Skip to content

Commit

Permalink
🔄 synced file(s) with circlefin/w3s-pw-web-sdk-internal (#28)
Browse files Browse the repository at this point in the history
synced local file(s) with
[circlefin/w3s-pw-web-sdk-internal](https://github.com/circlefin/w3s-pw-web-sdk-internal).



<details>
<summary>Changed files</summary>
<ul>
<li>synced local directory <code>docs/</code> with remote directory
<code>docs/</code></li><li>synced local directory <code>examples/</code>
with remote directory <code>examples/</code></li><li>synced local
<code>package.json</code> with remote
<code>package.json</code></li><li>synced local directory
<code>src/</code> with remote directory <code>src/</code></li>
</ul>
</details>

---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#10632873580](https://github.com/circlefin/w3s-pw-web-sdk-internal/actions/runs/10632873580)
  • Loading branch information
superandydong authored Aug 30, 2024
2 parents 6ad6747 + a5bc1b7 commit f8f3c5e
Show file tree
Hide file tree
Showing 12 changed files with 121 additions and 82 deletions.
8 changes: 4 additions & 4 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- [SecurityIntros](#securityintros)
- [SecurityQuestions](#securityquestions)
- [SecuritySummary](#securitysummary)
- [SsoConfirm](#ssoconfirm)
- [SocialEmailConfirm](#socialemailconfirm)
- [TransactionRequest](#transactionrequest)
- [ContractInteraction](#contractinteraction)
- [SignatureRequest](#signaturerequest)
Expand Down Expand Up @@ -81,7 +81,7 @@ Holds localization settings.
- `securityIntros` [\<SecurityIntros | undefined>](#securityintros) The settings for `SecurityIntros` screen.
- `securityQuestions` [\<SecurityQuestions | undefined>](#securityquestions) The settings for `SecurityQuestions` screen.
- `securitySummary` [\<SecuritySummary | undefined>](#securitysummary) The settings for `SecuritySummary` screen.
- `ssoConfirm` [\<SsoConfirm | undefined>](#ssoconfirm) The settings for `SsoConfirm` screen.
- `socialEmailConfirm` [\<SocialEmailConfirm | undefined>](#socialemailconfirm) The settings for `SocialEmailConfirm` screen.

### Common

Expand Down Expand Up @@ -166,9 +166,9 @@ Holds localization settings for `SecuritySummary` screen.
- `title` [\<string | undefined>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) Title text
- `question` [\<string | undefined>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) Question text

### SsoConfirm
### SocialEmailConfirm

Holds localization settings for `SsoConfirm` screen.
Holds localization settings for `SocialEmailConfirm` screen.

- `title` [\<string | undefined>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) Title text
- `headline` [\<string | undefined>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) Headline text
Expand Down
17 changes: 5 additions & 12 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,9 @@ enum enum ErrorCode {
insecurePinCode = 155704,
hintsMatchAnswers = 155705,
networkError = 155706,
biometricsSettingNotEnabled = 155708,
deviceNotSupportBiometrics = 155709,
biometricsKeyPermanentlyInvalidated = 155710,
biometricsUserSkip = 155711,
biometricsUserDisableForPin = 155712,
biometricsUserLockout = 155713,
biometricsUserLockoutPermanent = 155714,
biometricsUserNotAllowPermission = 155715,
biometricsInternalError = 155716,
invalidUserSecret= 155718,
userSecretMissing = 155717,
invalidUserTokenFormat= 155718,
userTokenMismatch = 155719,
walletIdNotFound = 156001,
tokenIdNotFound = 156002,
transactionIdNotFound = 156003,
Expand Down Expand Up @@ -271,8 +264,8 @@ Holds the OAuth information.

- `provider` [\<SocialLoginProvider>](#socialloginprovider) Social login
- `scope` [\<string[]>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) OAuth scope
- ssoUserUUID [\<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) SSO user UUID
- `ssoUserInfo` [\<object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#objects) SSO user information
- socialUserUUID [\<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) Social login user UUID
- `socialUserInfo` [\<object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#objects) Social login user information
- email [\<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) Email
- name [\<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) Name
- phone [\<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type) Phone
Expand Down
5 changes: 4 additions & 1 deletion examples/js-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"@circle-fin/w3s-pw-web-sdk": "^1.0.0",
"@circle-fin/w3s-pw-web-sdk": "^1.1.1",
"buffer": "^6.0.3",
"html-webpack-plugin": "^5.5.3",
"jquery": "^3.7.1",
"live-server": "^1.2.2",
"node-polyfill-webpack-plugin": "^4.0.0",
"process": "^0.11.10",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
Expand Down
11 changes: 11 additions & 0 deletions examples/js-example/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')

module.exports = {
entry: './src/index.js',
Expand All @@ -16,7 +17,17 @@ module.exports = {
$: 'jquery',
jQuery: 'jquery',
}),
new NodePolyfillPlugin(),
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
})
],
resolve: {
alias: {
process: 'process/browser',
},
},
devServer: {
static: {
directory: path.join(__dirname, 'dist'),
Expand Down
30 changes: 30 additions & 0 deletions examples/react-example/config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const webpack = require('webpack')

module.exports = function override(config) {
const fallback = config.resolve.fallback || {}

Object.assign(fallback, {
buffer: require.resolve('buffer/'),
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
util: require.resolve('util/'),
vm: require.resolve('vm-browserify'),
'process/browser': require.resolve('process/browser'),
})

config.resolve.fallback = fallback
config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
])
config.module.rules.unshift({
test: /\.m?js$/,
resolve: {
fullySpecified: false,
},
})

return config
}
17 changes: 12 additions & 5 deletions examples/react-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@circle-fin/w3s-pw-web-sdk": "^1.0.0",
"@circle-fin/w3s-pw-web-sdk": "^1.1.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"process": "^0.11.10",
"react": "^18.3.1",
"react-app-rewired": "^2.2.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
"stream-browserify": "^3.0.0",
"util": "^0.12.5",
"vm-browserify": "^1.1.2",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
5 changes: 4 additions & 1 deletion examples/vue-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"preview": "vite preview"
},
"dependencies": {
"@circle-fin/w3s-pw-web-sdk": "^1.0.0",
"@circle-fin/w3s-pw-web-sdk": "^1.1.1",
"buffer": "^6.0.3",
"process": "^0.11.10",
"vite-plugin-node-polyfills": "^0.22.0",
"vue": "^3.2.47"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions examples/vue-example/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
plugins: [nodePolyfills(), vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@circle-fin/w3s-pw-web-sdk",
"version": "1.1.0",
"version": "1.1.2",
"description": "Javascript/Typescript SDK for Circle Programmable Wallets",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('W3SSdk', () => {
expect(addEventListenerSpy).toHaveBeenCalledWith(
'message',
expect.any(Function),
false
false,
)
})

Expand Down Expand Up @@ -97,7 +97,7 @@ describe('W3SSdk', () => {
code: 1,
message: 'Some error',
} as Error,
undefined
undefined,
)
})
})
Loading

0 comments on commit f8f3c5e

Please sign in to comment.