@reown/appkit-react-native 0.0.0-feat-multi-social-20250714211631 → 0.0.0-feat-coinbase-20250722173213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/AppKit.js +45 -14
- package/lib/commonjs/AppKit.js.map +1 -1
- package/lib/commonjs/modal/w3m-account-button/index.js +4 -1
- package/lib/commonjs/modal/w3m-account-button/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-button/index.js +1 -1
- package/lib/commonjs/modal/w3m-button/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-modal/index.js +2 -1
- package/lib/commonjs/modal/w3m-modal/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-network-button/index.js +11 -5
- package/lib/commonjs/modal/w3m-network-button/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-activity/index.js +13 -4
- package/lib/commonjs/partials/w3m-account-activity/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-tokens/index.js +4 -1
- package/lib/commonjs/partials/w3m-account-tokens/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js +4 -2
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-header/index.js +3 -1
- package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-selector-modal/index.js +4 -1
- package/lib/commonjs/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-send-input-token/index.js +10 -7
- package/lib/commonjs/partials/w3m-send-input-token/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-send-input-token/styles.js +3 -0
- package/lib/commonjs/partials/w3m-send-input-token/styles.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +6 -8
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/index.js +42 -15
- package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-account-view/index.js +6 -2
- package/lib/commonjs/views/w3m-account-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js +3 -1
- package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js +4 -3
- package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-view/index.js +3 -1
- package/lib/commonjs/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-network-switch-view/index.js +5 -1
- package/lib/commonjs/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-networks-view/index.js +20 -12
- package/lib/commonjs/views/w3m-networks-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-checkout-view/index.js +4 -1
- package/lib/commonjs/views/w3m-onramp-checkout-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/index.js +4 -1
- package/lib/commonjs/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js +4 -1
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-unsupported-chain-view/index.js +4 -1
- package/lib/commonjs/views/w3m-unsupported-chain-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/index.js +4 -1
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-receive-view/index.js +5 -2
- package/lib/commonjs/views/w3m-wallet-receive-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-details.js +5 -12
- package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-details.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/index.js +0 -2
- package/lib/commonjs/views/w3m-wallet-send-preview-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js +4 -5
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-view/index.js +12 -21
- package/lib/commonjs/views/w3m-wallet-send-view/index.js.map +1 -1
- package/lib/module/AppKit.js +46 -15
- package/lib/module/AppKit.js.map +1 -1
- package/lib/module/modal/w3m-account-button/index.js +5 -2
- package/lib/module/modal/w3m-account-button/index.js.map +1 -1
- package/lib/module/modal/w3m-button/index.js +2 -2
- package/lib/module/modal/w3m-button/index.js.map +1 -1
- package/lib/module/modal/w3m-modal/index.js +2 -1
- package/lib/module/modal/w3m-modal/index.js.map +1 -1
- package/lib/module/modal/w3m-network-button/index.js +12 -6
- package/lib/module/modal/w3m-network-button/index.js.map +1 -1
- package/lib/module/partials/w3m-account-activity/index.js +14 -5
- package/lib/module/partials/w3m-account-activity/index.js.map +1 -1
- package/lib/module/partials/w3m-account-tokens/index.js +5 -2
- package/lib/module/partials/w3m-account-tokens/index.js.map +1 -1
- package/lib/module/partials/w3m-account-wallet-features/index.js +4 -2
- package/lib/module/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/module/partials/w3m-header/index.js +3 -1
- package/lib/module/partials/w3m-header/index.js.map +1 -1
- package/lib/module/partials/w3m-selector-modal/index.js +5 -2
- package/lib/module/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/module/partials/w3m-send-input-token/index.js +12 -9
- package/lib/module/partials/w3m-send-input-token/index.js.map +1 -1
- package/lib/module/partials/w3m-send-input-token/styles.js +3 -0
- package/lib/module/partials/w3m-send-input-token/styles.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +6 -8
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/index.js +42 -16
- package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/module/views/w3m-account-view/index.js +7 -3
- package/lib/module/views/w3m-account-view/index.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js +4 -2
- package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/index.js +4 -3
- package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-view/index.js +3 -1
- package/lib/module/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/module/views/w3m-network-switch-view/index.js +6 -2
- package/lib/module/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/module/views/w3m-networks-view/index.js +21 -13
- package/lib/module/views/w3m-networks-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-checkout-view/index.js +5 -2
- package/lib/module/views/w3m-onramp-checkout-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/index.js +5 -2
- package/lib/module/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-view/components/select-token-view/index.js +5 -2
- package/lib/module/views/w3m-swap-view/components/select-token-view/index.js.map +1 -1
- package/lib/module/views/w3m-unsupported-chain-view/index.js +5 -2
- package/lib/module/views/w3m-unsupported-chain-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-compatible-networks-view/index.js +5 -2
- package/lib/module/views/w3m-wallet-compatible-networks-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-receive-view/index.js +6 -3
- package/lib/module/views/w3m-wallet-receive-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-details.js +6 -13
- package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-details.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-preview-view/index.js +0 -2
- package/lib/module/views/w3m-wallet-send-preview-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-select-token-view/index.js +5 -6
- package/lib/module/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-view/index.js +14 -23
- package/lib/module/views/w3m-wallet-send-view/index.js.map +1 -1
- package/lib/typescript/AppKit.d.ts +3 -3
- package/lib/typescript/AppKit.d.ts.map +1 -1
- package/lib/typescript/AppKitContext.d.ts +1 -1
- package/lib/typescript/modal/w3m-account-button/index.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-modal/index.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-network-button/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-account-activity/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-account-tokens/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-account-wallet-features/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-header/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-selector-modal/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-send-input-token/index.d.ts +2 -2
- package/lib/typescript/partials/w3m-send-input-token/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-send-input-token/styles.d.ts +3 -0
- package/lib/typescript/partials/w3m-send-input-token/styles.d.ts.map +1 -1
- package/lib/typescript/utils/NetworkUtil.d.ts +2 -1
- package/lib/typescript/utils/NetworkUtil.d.ts.map +1 -1
- package/lib/typescript/views/w3m-account-default-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-account-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/custom-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-network-switch-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-networks-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-checkout-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-unsupported-chain-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-compatible-networks-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-receive-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-send-preview-view/components/preview-send-details.d.ts +1 -1
- package/lib/typescript/views/w3m-wallet-send-preview-view/components/preview-send-details.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-send-preview-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-send-select-token-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-send-view/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/AppKit.ts +72 -24
- package/src/modal/w3m-account-button/index.tsx +4 -3
- package/src/modal/w3m-button/index.tsx +2 -2
- package/src/modal/w3m-modal/index.tsx +2 -0
- package/src/modal/w3m-network-button/index.tsx +10 -6
- package/src/partials/w3m-account-activity/index.tsx +16 -5
- package/src/partials/w3m-account-tokens/index.tsx +3 -2
- package/src/partials/w3m-account-wallet-features/index.tsx +15 -11
- package/src/partials/w3m-header/index.tsx +3 -1
- package/src/partials/w3m-selector-modal/index.tsx +3 -2
- package/src/partials/w3m-send-input-token/index.tsx +17 -19
- package/src/partials/w3m-send-input-token/styles.ts +3 -0
- package/src/utils/NetworkUtil.ts +13 -10
- package/src/views/w3m-account-default-view/index.tsx +44 -17
- package/src/views/w3m-account-view/index.tsx +5 -3
- package/src/views/w3m-connect-view/components/custom-wallet-list.tsx +5 -2
- package/src/views/w3m-connecting-external-view/index.tsx +4 -3
- package/src/views/w3m-connecting-view/index.tsx +3 -1
- package/src/views/w3m-network-switch-view/index.tsx +4 -2
- package/src/views/w3m-networks-view/index.tsx +23 -12
- package/src/views/w3m-onramp-checkout-view/index.tsx +3 -2
- package/src/views/w3m-onramp-view/index.tsx +4 -3
- package/src/views/w3m-swap-view/components/select-token-view/index.tsx +3 -2
- package/src/views/w3m-unsupported-chain-view/index.tsx +7 -2
- package/src/views/w3m-wallet-compatible-networks-view/index.tsx +7 -2
- package/src/views/w3m-wallet-receive-view/index.tsx +4 -3
- package/src/views/w3m-wallet-send-preview-view/components/preview-send-details.tsx +4 -11
- package/src/views/w3m-wallet-send-preview-view/index.tsx +2 -9
- package/src/views/w3m-wallet-send-select-token-view/index.tsx +3 -4
- package/src/views/w3m-wallet-send-view/index.tsx +19 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-account-activity/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;AAuBhG,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-account-activity/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;AAuBhG,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,2CA0K/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-account-tokens/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAiBtB,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-account-tokens/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAiBtB,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,2CAoExD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-account-wallet-features/index.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,qBAAqB,CAAC,EAAE,gBAAgB,EAAE,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-account-wallet-features/index.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,qBAAqB,CAAC,EAAE,gBAAgB,EAAE,EAAE,0BAA0B,2CAgIrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-header/index.tsx"],"names":[],"mappings":"AAYA,wBAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-header/index.tsx"],"names":[],"mappings":"AAYA,wBAAgB,MAAM,mDA+GrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-selector-modal/index.tsx"],"names":[],"mappings":";AAiBA,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,KAAK,KAAK,CAAC,YAAY,CAAC;IAC5D,YAAY,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,OAAO,EACP,KAAK,EACL,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,WAAW,EACZ,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-selector-modal/index.tsx"],"names":[],"mappings":";AAiBA,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,KAAK,KAAK,CAAC,YAAY,CAAC;IAC5D,YAAY,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,OAAO,EACP,KAAK,EACL,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,WAAW,EACZ,EAAE,kBAAkB,2CA+EpB"}
|
|
@@ -3,9 +3,9 @@ import { type Balance } from '@reown/appkit-common-react-native';
|
|
|
3
3
|
export interface SendInputTokenProps {
|
|
4
4
|
token?: Balance;
|
|
5
5
|
sendTokenAmount?: number;
|
|
6
|
-
gasPrice?: number;
|
|
7
6
|
style?: StyleProp<ViewStyle>;
|
|
8
7
|
onTokenPress?: () => void;
|
|
8
|
+
loading?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function SendInputToken({ token, sendTokenAmount,
|
|
10
|
+
export declare function SendInputToken({ token, sendTokenAmount, style, onTokenPress, loading }: SendInputTokenProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-send-input-token/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-send-input-token/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AASzE,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAM7E,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,eAAe,EACf,KAAK,EACL,YAAY,EACZ,OAAO,EACR,EAAE,mBAAmB,2CAsFrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-send-input-token/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-send-input-token/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wBAmBG"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { AppKitNetwork, CaipNetworkId, Network } from '@reown/appkit-common-react-native';
|
|
2
|
+
import type { CaipNamespaces } from '@reown/appkit-core-react-native';
|
|
2
3
|
export declare const NetworkUtil: {
|
|
3
4
|
formatNetwork(network: Network, projectId: string): AppKitNetwork;
|
|
4
5
|
formatNetworks(networks: Network[], projectId: string): AppKitNetwork[];
|
|
5
6
|
getBlockchainApiRpcUrl(caipNetworkId: CaipNetworkId, projectId: string): string;
|
|
6
|
-
getDefaultChainId(
|
|
7
|
+
getDefaultChainId(namespaces: CaipNamespaces, defaultNetwork?: AppKitNetwork): CaipNetworkId | undefined;
|
|
7
8
|
};
|
|
8
9
|
//# sourceMappingURL=NetworkUtil.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/NetworkUtil.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"NetworkUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/NetworkUtil.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,eAAO,MAAM,WAAW;2BACC,OAAO,aAAa,MAAM,GAAG,aAAa;6BAqBxC,OAAO,EAAE,aAAa,MAAM,GAAG,aAAa,EAAE;0CAMjC,aAAa,aAAa,MAAM;kCASxD,cAAc,mBACT,aAAa,GAC7B,aAAa,GAAG,SAAS;CAY7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-account-default-view/index.tsx"],"names":[],"mappings":"AAoCA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-account-default-view/index.tsx"],"names":[],"mappings":"AAoCA,wBAAgB,kBAAkB,4CAuTjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-account-view/index.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-account-view/index.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,WAAW,4CAoE1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-wallet-list.d.ts","sourceRoot":"","sources":["../../../../../src/views/w3m-connect-view/components/custom-wallet-list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAEL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"custom-wallet-list.d.ts","sourceRoot":"","sources":["../../../../../src/views/w3m-connect-view/components/custom-wallet-list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAEL,KAAK,YAAY,EAMlB,MAAM,iCAAiC,CAAC;AAIzC,UAAU,KAAK;IACb,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,aAAa,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9C,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,sBAAsB,EAAE,EAAE,KAAK,oDAuB3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-external-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-external-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,sBAAsB,4CA6GrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-view/index.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,cAAc,4CAiI7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-network-switch-view/index.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-network-switch-view/index.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,iBAAiB,4CA4GhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-networks-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-networks-view/index.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,YAAY,4CA4F3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-onramp-checkout-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-onramp-checkout-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,kBAAkB,4CA2LjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-onramp-view/index.tsx"],"names":[],"mappings":"AAqCA,wBAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-onramp-view/index.tsx"],"names":[],"mappings":"AAqCA,wBAAgB,UAAU,4CAgQzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/w3m-swap-view/components/select-token-view/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,iCAAiC,CAAC;AAOzC,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/w3m-swap-view/components/select-token-view/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,iCAAiC,CAAC;AAOzC,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,2CAmI3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-unsupported-chain-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-unsupported-chain-view/index.tsx"],"names":[],"mappings":"AAaA,wBAAgB,oBAAoB,4CAkEnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-compatible-networks-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-compatible-networks-view/index.tsx"],"names":[],"mappings":"AAWA,wBAAgB,wBAAwB,4CAuCvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-receive-view/index.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-receive-view/index.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,iBAAiB,wDAoEhC"}
|
package/lib/typescript/views/w3m-wallet-send-preview-view/components/preview-send-details.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export interface PreviewSendDetailsProps {
|
|
|
7
7
|
networkFee?: number;
|
|
8
8
|
style?: StyleProp<ViewStyle>;
|
|
9
9
|
}
|
|
10
|
-
export declare function PreviewSendDetails({ address, name, activeNetwork,
|
|
10
|
+
export declare function PreviewSendDetails({ address, name, activeNetwork, style }: PreviewSendDetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=preview-send-details.d.ts.map
|
package/lib/typescript/views/w3m-wallet-send-preview-view/components/preview-send-details.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-send-details.d.ts","sourceRoot":"","sources":["../../../../../src/views/w3m-wallet-send-preview-view/components/preview-send-details.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAUvE,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"preview-send-details.d.ts","sourceRoot":"","sources":["../../../../../src/views/w3m-wallet-send-preview-view/components/preview-send-details.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAUvE,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1E,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,IAAI,EACJ,aAAa,EACb,KAAK,EACN,EAAE,uBAAuB,2CA4CzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-preview-view/index.tsx"],"names":[],"mappings":"AAcA,wBAAgB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-preview-view/index.tsx"],"names":[],"mappings":"AAcA,wBAAgB,qBAAqB,4CAgHpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-select-token-view/index.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-select-token-view/index.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,yBAAyB,4CA+DxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-view/index.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,cAAc,4CA6G7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reown/appkit-react-native",
|
|
3
|
-
"version": "0.0.0-feat-
|
|
3
|
+
"version": "0.0.0-feat-coinbase-20250722173213",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"types": "lib/typescript/index.d.ts",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@reown/appkit-common-react-native": "0.0.0-feat-
|
|
41
|
-
"@reown/appkit-core-react-native": "0.0.0-feat-
|
|
42
|
-
"@reown/appkit-siwe-react-native": "0.0.0-feat-
|
|
43
|
-
"@reown/appkit-ui-react-native": "0.0.0-feat-
|
|
44
|
-
"@walletconnect/universal-provider": "2.
|
|
40
|
+
"@reown/appkit-common-react-native": "0.0.0-feat-coinbase-20250722173213",
|
|
41
|
+
"@reown/appkit-core-react-native": "0.0.0-feat-coinbase-20250722173213",
|
|
42
|
+
"@reown/appkit-siwe-react-native": "0.0.0-feat-coinbase-20250722173213",
|
|
43
|
+
"@reown/appkit-ui-react-native": "0.0.0-feat-coinbase-20250722173213",
|
|
44
|
+
"@walletconnect/universal-provider": "2.21.5",
|
|
45
45
|
"valtio": "^1.13.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
package/src/AppKit.ts
CHANGED
|
@@ -12,14 +12,16 @@ import {
|
|
|
12
12
|
ThemeController,
|
|
13
13
|
ConnectionController,
|
|
14
14
|
SwapController,
|
|
15
|
-
OnRampController
|
|
15
|
+
OnRampController,
|
|
16
|
+
CoreHelperUtil,
|
|
17
|
+
SendController
|
|
16
18
|
} from '@reown/appkit-core-react-native';
|
|
17
19
|
|
|
18
20
|
import {
|
|
19
21
|
type WalletConnector,
|
|
20
22
|
type BlockchainAdapter,
|
|
21
23
|
type ProposalNamespaces,
|
|
22
|
-
type
|
|
24
|
+
type ConnectorType,
|
|
23
25
|
type Namespaces,
|
|
24
26
|
type Metadata,
|
|
25
27
|
type CaipNetworkId,
|
|
@@ -71,7 +73,6 @@ export class AppKit {
|
|
|
71
73
|
private projectId: string;
|
|
72
74
|
private adapters: BlockchainAdapter[];
|
|
73
75
|
private networks: AppKitNetwork[];
|
|
74
|
-
private defaultNetwork?: AppKitNetwork;
|
|
75
76
|
private namespaces: ProposalNamespaces;
|
|
76
77
|
private config: AppKitConfig;
|
|
77
78
|
private extraConnectors: WalletConnector[];
|
|
@@ -79,7 +80,7 @@ export class AppKit {
|
|
|
79
80
|
|
|
80
81
|
constructor(config: AppKitConfig) {
|
|
81
82
|
this.projectId = config.projectId;
|
|
82
|
-
this.adapters = config.adapters;
|
|
83
|
+
this.adapters = config.adapters ?? [];
|
|
83
84
|
|
|
84
85
|
// Validate adapters to ensure no duplicate chainNamespaces
|
|
85
86
|
const namespaceMap = new Map<ChainNamespace, string>();
|
|
@@ -97,9 +98,6 @@ export class AppKit {
|
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
this.networks = NetworkUtil.formatNetworks(config.networks, this.projectId); //TODO: check this
|
|
100
|
-
this.defaultNetwork = config.defaultNetwork
|
|
101
|
-
? NetworkUtil.formatNetwork(config.defaultNetwork, this.projectId)
|
|
102
|
-
: undefined;
|
|
103
101
|
this.namespaces = WcHelpersUtil.createNamespaces(this.networks) as ProposalNamespaces;
|
|
104
102
|
this.config = config;
|
|
105
103
|
this.extraConnectors = config.extraConnectors || [];
|
|
@@ -113,14 +111,18 @@ export class AppKit {
|
|
|
113
111
|
* @param type - The type of connector to use.
|
|
114
112
|
* @param options - Optional connection options.
|
|
115
113
|
*/
|
|
116
|
-
async connect(type:
|
|
114
|
+
async connect(type: ConnectorType, options?: AppKitConnectOptions): Promise<void> {
|
|
117
115
|
try {
|
|
118
116
|
const { namespaces, defaultChain, universalLink } = options ?? {};
|
|
119
117
|
const connector = await this.createConnector(type);
|
|
120
118
|
|
|
119
|
+
const chain =
|
|
120
|
+
defaultChain ??
|
|
121
|
+
NetworkUtil.getDefaultChainId(this.namespaces, OptionsController.state.defaultNetwork);
|
|
122
|
+
|
|
121
123
|
const approvedNamespaces = await connector.connect({
|
|
122
124
|
namespaces: namespaces ?? this.namespaces,
|
|
123
|
-
defaultChain,
|
|
125
|
+
defaultChain: chain,
|
|
124
126
|
universalLink,
|
|
125
127
|
siweConfig: this.config?.siweConfig
|
|
126
128
|
});
|
|
@@ -202,9 +204,16 @@ export class AppKit {
|
|
|
202
204
|
RouterController.reset('Connect');
|
|
203
205
|
TransactionsController.resetState();
|
|
204
206
|
SwapController.resetState();
|
|
207
|
+
SendController.resetState();
|
|
205
208
|
OnRampController.resetState();
|
|
206
209
|
ConnectionController.disconnect();
|
|
207
210
|
|
|
211
|
+
if (ConnectionsController.state.activeNamespace === undefined) {
|
|
212
|
+
ConnectionsController.setActiveNamespace(
|
|
213
|
+
OptionsController.state.defaultNetwork?.chainNamespace
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
208
217
|
if (OptionsController.state.isSiweEnabled) {
|
|
209
218
|
await SIWEController.signOut();
|
|
210
219
|
}
|
|
@@ -243,6 +252,14 @@ export class AppKit {
|
|
|
243
252
|
}
|
|
244
253
|
|
|
245
254
|
async switchNetwork(network: AppKitNetwork): Promise<void> {
|
|
255
|
+
const { isConnected } = ConnectionsController.state;
|
|
256
|
+
|
|
257
|
+
if (!isConnected) {
|
|
258
|
+
OptionsController.setDefaultNetwork(network);
|
|
259
|
+
|
|
260
|
+
return Promise.resolve();
|
|
261
|
+
}
|
|
262
|
+
|
|
246
263
|
const adapter = this.getAdapterByNamespace(network.chainNamespace);
|
|
247
264
|
if (!adapter) throw new Error('No active adapter');
|
|
248
265
|
|
|
@@ -256,10 +273,7 @@ export class AppKit {
|
|
|
256
273
|
}
|
|
257
274
|
});
|
|
258
275
|
|
|
259
|
-
ConnectionsController.setActiveNetwork(
|
|
260
|
-
adapter.getSupportedNamespace(),
|
|
261
|
-
`${adapter.getSupportedNamespace()}:${network.id}` as CaipNetworkId
|
|
262
|
-
);
|
|
276
|
+
ConnectionsController.setActiveNetwork(network.chainNamespace, network.caipNetworkId);
|
|
263
277
|
|
|
264
278
|
if (ConnectionsController.state.activeNamespace !== network.chainNamespace) {
|
|
265
279
|
ConnectionsController.setActiveNamespace(network.chainNamespace);
|
|
@@ -296,7 +310,7 @@ export class AppKit {
|
|
|
296
310
|
});
|
|
297
311
|
}
|
|
298
312
|
|
|
299
|
-
private async createConnector(type:
|
|
313
|
+
private async createConnector(type: ConnectorType): Promise<WalletConnector> {
|
|
300
314
|
// Check if an extra connector was provided by the developer
|
|
301
315
|
const CustomConnector = this.extraConnectors.find(
|
|
302
316
|
connector => connector.type.toLowerCase() === type.toLowerCase()
|
|
@@ -365,6 +379,13 @@ export class AppKit {
|
|
|
365
379
|
this.syncAccounts(initializedAdapters);
|
|
366
380
|
|
|
367
381
|
AccountController.setIsConnected(true);
|
|
382
|
+
|
|
383
|
+
if (
|
|
384
|
+
OptionsController.state.isSiweEnabled &&
|
|
385
|
+
ConnectionsController.state.activeNamespace === 'eip155'
|
|
386
|
+
) {
|
|
387
|
+
this.handleSiweChange();
|
|
388
|
+
}
|
|
368
389
|
}
|
|
369
390
|
} catch (error) {
|
|
370
391
|
// Use console.warn for non-critical initialization failures
|
|
@@ -464,8 +485,8 @@ export class AppKit {
|
|
|
464
485
|
});
|
|
465
486
|
});
|
|
466
487
|
|
|
467
|
-
const updateActiveNamespace = !Object.keys(approvedNamespaces).
|
|
468
|
-
|
|
488
|
+
const updateActiveNamespace = !Object.keys(approvedNamespaces).some(
|
|
489
|
+
namespace => namespace === ConnectionsController.state.activeNamespace
|
|
469
490
|
);
|
|
470
491
|
|
|
471
492
|
// If the active namespace is not in the approved namespaces or is undefined, set the first connected adapter's namespace as active
|
|
@@ -492,12 +513,15 @@ export class AppKit {
|
|
|
492
513
|
const namespace = adapter.getSupportedNamespace();
|
|
493
514
|
const chain = `${namespace}:${chainId}` as CaipNetworkId;
|
|
494
515
|
ConnectionsController.setActiveNetwork(namespace, chain);
|
|
516
|
+
const connection = ConnectionsController.state.connections.get(namespace);
|
|
517
|
+
const isAuth = !!connection?.properties?.provider;
|
|
495
518
|
|
|
496
519
|
const network = this.networks.find(n => n.id?.toString() === chainId);
|
|
497
520
|
this.syncBalances(adapter, network);
|
|
521
|
+
SendController.resetState();
|
|
498
522
|
|
|
499
|
-
if (
|
|
500
|
-
|
|
523
|
+
if (isAuth) {
|
|
524
|
+
ConnectionsController.fetchBalance();
|
|
501
525
|
}
|
|
502
526
|
|
|
503
527
|
if (namespace === 'eip155') {
|
|
@@ -526,20 +550,25 @@ export class AppKit {
|
|
|
526
550
|
OptionsController.setMetadata(options.metadata);
|
|
527
551
|
OptionsController.setIncludeWalletIds(options.includeWalletIds);
|
|
528
552
|
this.setExcludedWallets(options);
|
|
553
|
+
this.setCustomWallets(options);
|
|
529
554
|
OptionsController.setFeaturedWalletIds(options.featuredWalletIds);
|
|
530
555
|
OptionsController.setTokens(options.tokens);
|
|
531
|
-
OptionsController.setCustomWallets(options.customWallets);
|
|
532
556
|
OptionsController.setEnableAnalytics(options.enableAnalytics);
|
|
533
557
|
OptionsController.setDebug(options.debug);
|
|
534
558
|
OptionsController.setFeatures(options.features);
|
|
535
559
|
OptionsController.setStorage(options.storage);
|
|
536
560
|
|
|
561
|
+
if (options.defaultNetwork) {
|
|
562
|
+
const network = NetworkUtil.formatNetwork(options.defaultNetwork, this.projectId);
|
|
563
|
+
OptionsController.setDefaultNetwork(network);
|
|
564
|
+
}
|
|
565
|
+
|
|
537
566
|
ThemeController.setThemeMode(options.themeMode);
|
|
538
567
|
ThemeController.setThemeVariables(options.themeVariables);
|
|
539
568
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
569
|
+
OptionsController.setSdkVersion(
|
|
570
|
+
CoreHelperUtil.generateSdkVersion(this.adapters, ConstantsUtil.VERSION)
|
|
571
|
+
);
|
|
543
572
|
|
|
544
573
|
if (options.clipboardClient) {
|
|
545
574
|
OptionsController.setClipboardClient(options.clipboardClient);
|
|
@@ -563,8 +592,10 @@ export class AppKit {
|
|
|
563
592
|
const activeNamespace = await StorageUtil.getActiveNamespace();
|
|
564
593
|
if (activeNamespace) {
|
|
565
594
|
ConnectionsController.setActiveNamespace(activeNamespace);
|
|
566
|
-
} else if (
|
|
567
|
-
ConnectionsController.setActiveNamespace(
|
|
595
|
+
} else if (OptionsController.state.defaultNetwork) {
|
|
596
|
+
ConnectionsController.setActiveNamespace(
|
|
597
|
+
OptionsController.state.defaultNetwork?.chainNamespace
|
|
598
|
+
);
|
|
568
599
|
}
|
|
569
600
|
}
|
|
570
601
|
|
|
@@ -605,6 +636,23 @@ export class AppKit {
|
|
|
605
636
|
OptionsController.setExcludeWalletIds(excludedWallets);
|
|
606
637
|
}
|
|
607
638
|
|
|
639
|
+
private setCustomWallets(options: AppKitConfig) {
|
|
640
|
+
const { customWallets, extraConnectors, adapters } = options;
|
|
641
|
+
|
|
642
|
+
const customList = [...(customWallets ?? [])];
|
|
643
|
+
|
|
644
|
+
const addPhantom =
|
|
645
|
+
adapters.some(adapter => adapter.getSupportedNamespace() === 'solana') &&
|
|
646
|
+
extraConnectors?.some(connector => connector.type.toLowerCase() === 'phantom') &&
|
|
647
|
+
!customList.some(wallet => wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id);
|
|
648
|
+
|
|
649
|
+
if (addPhantom) {
|
|
650
|
+
customList.push(ConstantsUtil.PHANTOM_CUSTOM_WALLET);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
OptionsController.setCustomWallets(customList);
|
|
654
|
+
}
|
|
655
|
+
|
|
608
656
|
private async initAsyncValues(options: AppKitConfig) {
|
|
609
657
|
await this.initActiveNamespace();
|
|
610
658
|
await this.initRecentWallets(options);
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
AccountController,
|
|
4
4
|
CoreHelperUtil,
|
|
5
5
|
ModalController,
|
|
6
|
-
AssetUtil,
|
|
7
6
|
ThemeController,
|
|
8
|
-
ConnectionsController
|
|
7
|
+
ConnectionsController,
|
|
8
|
+
AssetController
|
|
9
9
|
} from '@reown/appkit-core-react-native';
|
|
10
10
|
|
|
11
11
|
import { AccountButton as AccountButtonUI, ThemeProvider } from '@reown/appkit-ui-react-native';
|
|
@@ -22,13 +22,14 @@ export interface AccountButtonProps {
|
|
|
22
22
|
export function AccountButton({ balance, disabled, style, testID }: AccountButtonProps) {
|
|
23
23
|
const { profileImage, profileName } = useSnapshot(AccountController.state);
|
|
24
24
|
const { themeMode, themeVariables } = useSnapshot(ThemeController.state);
|
|
25
|
+
const { networkImages } = useSnapshot(AssetController.state);
|
|
25
26
|
const {
|
|
26
27
|
activeAddress: address,
|
|
27
28
|
activeBalance,
|
|
28
29
|
activeNetwork
|
|
29
30
|
} = useSnapshot(ConnectionsController.state);
|
|
30
31
|
|
|
31
|
-
const networkImage =
|
|
32
|
+
const networkImage = activeNetwork ? networkImages[activeNetwork.id] : undefined;
|
|
32
33
|
const showBalance = balance === 'show';
|
|
33
34
|
|
|
34
35
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSnapshot } from 'valtio';
|
|
2
2
|
import { AccountButton, type AccountButtonProps } from '../w3m-account-button';
|
|
3
3
|
import { ConnectButton, type ConnectButtonProps } from '../w3m-connect-button';
|
|
4
|
-
import {
|
|
4
|
+
import { ConnectionsController, ModalController } from '@reown/appkit-core-react-native';
|
|
5
5
|
|
|
6
6
|
export interface AppKitButtonProps {
|
|
7
7
|
balance?: AccountButtonProps['balance'];
|
|
@@ -22,7 +22,7 @@ export function AppKitButton({
|
|
|
22
22
|
accountStyle,
|
|
23
23
|
connectStyle
|
|
24
24
|
}: AppKitButtonProps) {
|
|
25
|
-
const { isConnected } = useSnapshot(
|
|
25
|
+
const { isConnected } = useSnapshot(ConnectionsController.state);
|
|
26
26
|
const { loading } = useSnapshot(ModalController.state);
|
|
27
27
|
|
|
28
28
|
return !loading && isConnected ? (
|
|
@@ -46,7 +46,9 @@ export function AppKit() {
|
|
|
46
46
|
|
|
47
47
|
const handleClose = async () => {
|
|
48
48
|
if (OptionsController.state.isSiweEnabled) {
|
|
49
|
+
const session = await SIWEController.getSession();
|
|
49
50
|
if (
|
|
51
|
+
!session &&
|
|
50
52
|
SIWEController.state.status !== 'success' &&
|
|
51
53
|
ConnectionsController.state.activeNamespace === 'eip155' &&
|
|
52
54
|
!!ConnectionsController.state.activeAddress
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useSnapshot } from 'valtio';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import {
|
|
4
|
-
AccountController,
|
|
5
4
|
ApiController,
|
|
6
|
-
|
|
5
|
+
AssetController,
|
|
7
6
|
ConnectionsController,
|
|
8
7
|
EventsController,
|
|
9
8
|
ModalController,
|
|
9
|
+
OptionsController,
|
|
10
10
|
ThemeController
|
|
11
11
|
} from '@reown/appkit-core-react-native';
|
|
12
12
|
import { NetworkButton as NetworkButtonUI, ThemeProvider } from '@reown/appkit-ui-react-native';
|
|
@@ -17,11 +17,15 @@ export interface NetworkButtonProps {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export function NetworkButton({ disabled, style }: NetworkButtonProps) {
|
|
20
|
-
const { isConnected } = useSnapshot(
|
|
21
|
-
const {
|
|
20
|
+
const { activeNetwork, isConnected } = useSnapshot(ConnectionsController.state);
|
|
21
|
+
const { networkImages } = useSnapshot(AssetController.state);
|
|
22
|
+
const { defaultNetwork } = useSnapshot(OptionsController.state);
|
|
22
23
|
const { loading } = useSnapshot(ModalController.state);
|
|
23
24
|
const { themeMode, themeVariables } = useSnapshot(ThemeController.state);
|
|
24
25
|
|
|
26
|
+
const network = isConnected ? activeNetwork : defaultNetwork;
|
|
27
|
+
const networkImage = network ? networkImages[network.id] : undefined;
|
|
28
|
+
|
|
25
29
|
const onNetworkPress = () => {
|
|
26
30
|
ModalController.open({ view: 'Networks' });
|
|
27
31
|
EventsController.sendEvent({
|
|
@@ -33,7 +37,7 @@ export function NetworkButton({ disabled, style }: NetworkButtonProps) {
|
|
|
33
37
|
return (
|
|
34
38
|
<ThemeProvider themeMode={themeMode} themeVariables={themeVariables}>
|
|
35
39
|
<NetworkButtonUI
|
|
36
|
-
imageSrc={
|
|
40
|
+
imageSrc={networkImage}
|
|
37
41
|
imageHeaders={ApiController._getApiHeaders()}
|
|
38
42
|
disabled={disabled || loading}
|
|
39
43
|
style={style}
|
|
@@ -41,7 +45,7 @@ export function NetworkButton({ disabled, style }: NetworkButtonProps) {
|
|
|
41
45
|
loading={loading}
|
|
42
46
|
testID="network-button"
|
|
43
47
|
>
|
|
44
|
-
{
|
|
48
|
+
{network?.name ?? (isConnected ? 'Unknown Network' : 'Select Network')}
|
|
45
49
|
</NetworkButtonUI>
|
|
46
50
|
</ThemeProvider>
|
|
47
51
|
);
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '@reown/appkit-ui-react-native';
|
|
13
13
|
import { type Transaction, type TransactionImage } from '@reown/appkit-common-react-native';
|
|
14
14
|
import {
|
|
15
|
-
|
|
15
|
+
AssetController,
|
|
16
16
|
ConnectionsController,
|
|
17
17
|
ConstantsUtil,
|
|
18
18
|
EventsController,
|
|
@@ -33,13 +33,19 @@ export function AccountActivity({ style }: Props) {
|
|
|
33
33
|
const [initialLoad, setInitialLoad] = useState(true);
|
|
34
34
|
const { loading, transactions, next } = useSnapshot(TransactionsController.state);
|
|
35
35
|
const { activeNetwork } = useSnapshot(ConnectionsController.state);
|
|
36
|
-
const
|
|
36
|
+
const { networkImages } = useSnapshot(AssetController.state);
|
|
37
|
+
const networkImage = activeNetwork ? networkImages[activeNetwork.id] : undefined;
|
|
37
38
|
const isSupported =
|
|
38
39
|
activeNetwork?.caipNetworkId &&
|
|
39
40
|
ConstantsUtil.ACTIVITY_SUPPORTED_CHAINS.includes(activeNetwork.caipNetworkId);
|
|
40
41
|
|
|
41
42
|
const handleLoadMore = () => {
|
|
42
43
|
const address = ConnectionsController.state.activeAddress;
|
|
44
|
+
|
|
45
|
+
if (!address) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
43
49
|
TransactionsController.fetchTransactions(address);
|
|
44
50
|
EventsController.sendEvent({
|
|
45
51
|
type: 'track',
|
|
@@ -54,8 +60,13 @@ export function AccountActivity({ style }: Props) {
|
|
|
54
60
|
};
|
|
55
61
|
|
|
56
62
|
const onRefresh = useCallback(async () => {
|
|
57
|
-
setRefreshing(true);
|
|
58
63
|
const address = ConnectionsController.state.activeAddress;
|
|
64
|
+
|
|
65
|
+
if (!address) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
setRefreshing(true);
|
|
59
70
|
await TransactionsController.fetchTransactions(address, true);
|
|
60
71
|
setRefreshing(false);
|
|
61
72
|
}, []);
|
|
@@ -65,8 +76,8 @@ export function AccountActivity({ style }: Props) {
|
|
|
65
76
|
}, [transactions]);
|
|
66
77
|
|
|
67
78
|
useEffect(() => {
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
const address = ConnectionsController.state.activeAddress;
|
|
80
|
+
if (!TransactionsController.state.transactions.length && address) {
|
|
70
81
|
TransactionsController.fetchTransactions(address, true);
|
|
71
82
|
}
|
|
72
83
|
// Set initial load to false after first fetch
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import { useSnapshot } from 'valtio';
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
AssetController,
|
|
12
12
|
ConnectionsController,
|
|
13
13
|
RouterController
|
|
14
14
|
} from '@reown/appkit-core-react-native';
|
|
@@ -31,7 +31,8 @@ export function AccountTokens({ style, isLoading }: Props) {
|
|
|
31
31
|
const Theme = useTheme();
|
|
32
32
|
const [refreshing, setRefreshing] = useState(false);
|
|
33
33
|
const { activeNetwork, balances } = useSnapshot(ConnectionsController.state);
|
|
34
|
-
const
|
|
34
|
+
const { networkImages } = useSnapshot(AssetController.state);
|
|
35
|
+
const networkImage = activeNetwork ? networkImages[activeNetwork.id] : undefined;
|
|
35
36
|
|
|
36
37
|
const getBalance = useCallback(async () => {
|
|
37
38
|
setRefreshing(true);
|