Skip to content

Commit 255142a

Browse files
committed
Fixed XRPL Modal and No Modal examples
1 parent 86111b8 commit 255142a

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

web-modal-sdk/blockchain-connection-examples/xrpl-modal-example/src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ function App() {
1818
chainId: "0x2",
1919
// Avoid using public rpcTarget & wsTarget in production.
2020
// Use services like Infura, Quicknode etc
21-
rpcTarget: "https://xrplcluster.com",
22-
wsTarget: "wss://xrplcluster.com",
21+
rpcTarget: "https://testnet.xrpl-labs.com",
22+
wsTarget: "wss://testnet.xrpl-labs.com/",
2323
ticker: "XRP",
2424
tickerName: "XRPL",
25-
displayName: "xrpl mainnet",
26-
blockExplorerUrl: "https://livenet.xrpl.org",
25+
displayName: "xrpl testnet",
26+
blockExplorerUrl: "https://testnet.xrpl.org",
2727
};
2828

2929
useEffect(() => {

web-modal-sdk/blockchain-connection-examples/xrpl-modal-example/src/xrplRPC.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ export default class XrplRPC {
6767
try {
6868
const msg = "Hello world";
6969
const hexMsg = convertStringToHex(msg);
70+
console.log("hexMsg", hexMsg);
7071
const txSign = await this.provider.request<{ signature: string }, never>({
7172
method: "xrpl_signMessage",
7273
params: {
73-
signature: hexMsg,
74+
message: hexMsg,
7475
},
7576
});
7677
return txSign;

web-modal-sdk/blockchain-connection-examples/xrpl-modal-example/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export default defineConfig({
77
resolve: {
88
alias: {
99
crypto: "empty-module",
10+
stream: "stream-browserify",
11+
assert: "assert",
1012
},
1113
},
1214
define: {

web-no-modal-sdk/blockchain-connection-examples/xrpl-no-modal-example/src/App.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ function App() {
1919
const chainConfig = {
2020
chainNamespace: CHAIN_NAMESPACES.XRPL,
2121
chainId: "0x2",
22-
rpcTarget: "https://testnet-ripple-node.tor.us",
23-
wsTarget: "wss://s.altnet.rippletest.net",
22+
rpcTarget: "https://testnet.xrpl-labs.com",
23+
wsTarget: "wss://testnet.xrpl-labs.com/",
2424
ticker: "XRP",
2525
tickerName: "XRPL",
2626
displayName: "xrpl testnet",
@@ -36,6 +36,7 @@ function App() {
3636
clientId,
3737
privateKeyProvider,
3838
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
39+
enableLogging: true,
3940
});
4041

4142
const authAdapter = new AuthAdapter({

web-no-modal-sdk/blockchain-connection-examples/xrpl-no-modal-example/src/xrplRPC.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default class XrplRPC {
1313
const accounts = await this.provider.request<never, string[]>({
1414
method: "xrpl_getAccounts",
1515
});
16+
console.log("accounts", accounts);
1617
if (accounts) {
1718
const accInfo = await this.provider.request({
1819
method: "account_info",

web-no-modal-sdk/blockchain-connection-examples/xrpl-no-modal-example/vite.config.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@ export default defineConfig({
77
resolve: {
88
alias: {
99
crypto: "empty-module",
10-
assert: "empty-module",
10+
assert: "assert",
1111
http: "empty-module",
1212
https: "empty-module",
1313
os: "empty-module",
1414
url: "empty-module",
1515
zlib: "empty-module",
16-
stream: "empty-module",
17-
_stream_duplex: "empty-module",
18-
_stream_passthrough: "empty-module",
19-
_stream_readable: "empty-module",
20-
_stream_writable: "empty-module",
21-
_stream_transform: "empty-module",
16+
stream: "stream-browserify",
2217
},
2318
},
2419
define: {

0 commit comments

Comments
 (0)