Skip to content

Commit bd92d95

Browse files
committed
use same prettier as for #97
1 parent e200b32 commit bd92d95

24 files changed

+885
-885
lines changed

docs/docs/.prettierrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"useTabs": true,
3-
"singleQuote": false,
4-
"trailingComma": "none",
5-
"printWidth": 100
2+
"useTabs": false,
3+
"singleQuote": false,
4+
"trailingComma": "all",
5+
"printWidth": 100
66
}

docs/docs/02-quick-start.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -52,32 +52,32 @@ import { SprinterContext, useSprinterBalances } from "@chainsafe/sprinter-react"
5252
import { Environment } from "@chainsafe/sprinter-sdk";
5353

5454
function BalancesComponent() {
55-
const { balances, getUserBalances } = useSprinterBalances("0xYourAddressHere");
56-
57-
useEffect(() => {
58-
getUserBalances();
59-
}, [getUserBalances]);
60-
61-
if (balances.loading) return <div>Loading...</div>;
62-
if (balances.error) return <div>Error: {balances.error}</div>;
63-
64-
return (
65-
<ul>
66-
{Object.entries(balances.data || {}).map(([symbol, balanceEntry]) => (
67-
<li key={symbol}>
68-
{symbol}: {balanceEntry.total}
69-
</li>
70-
))}
71-
</ul>
72-
);
55+
const { balances, getUserBalances } = useSprinterBalances("0xYourAddressHere");
56+
57+
useEffect(() => {
58+
getUserBalances();
59+
}, [getUserBalances]);
60+
61+
if (balances.loading) return <div>Loading...</div>;
62+
if (balances.error) return <div>Error: {balances.error}</div>;
63+
64+
return (
65+
<ul>
66+
{Object.entries(balances.data || {}).map(([symbol, balanceEntry]) => (
67+
<li key={symbol}>
68+
{symbol}: {balanceEntry.total}
69+
</li>
70+
))}
71+
</ul>
72+
);
7373
}
7474

7575
function App() {
76-
return (
77-
<SprinterContext baseUrl={Environment.MAINNET}>
78-
<BalancesComponent />
79-
</SprinterContext>
80-
);
76+
return (
77+
<SprinterContext baseUrl={Environment.MAINNET}>
78+
<BalancesComponent />
79+
</SprinterContext>
80+
);
8181
}
8282

8383
export default App;

docs/docs/03-sdk/03-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ import { Sprinter, Environment } from "@chainsafe/sprinter-sdk";
2121

2222
// Using a custom base URL
2323
const sprinter = new Sprinter({
24-
baseUrl: "https://api.sprinter.buildwithsygma.com"
24+
baseUrl: "https://api.sprinter.buildwithsygma.com",
2525
});
2626

2727
// Or using a predefined environment URL
2828
const sprinterWithEnv = new Sprinter({
29-
baseUrl: Environment.MAINNET // Enum that provides predefined URLs
29+
baseUrl: Environment.MAINNET, // Enum that provides predefined URLs
3030
});
3131
```
3232

@@ -76,7 +76,7 @@ Every method in the SDK accepts an optional `fetchOptions` parameter, which cont
7676

7777
```typescript
7878
sprinter.getAvailableTokens({ baseUrl: "https://custom.api.url" }).then((tokens) => {
79-
console.log(tokens);
79+
console.log(tokens);
8080
});
8181
```
8282

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"label": "Methods Reference"
2+
"label": "Methods Reference"
33
}

docs/docs/03-sdk/04-methods-reference/_how-to-calldata.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -35,53 +35,53 @@ contract StakingContract {
3535

3636
```json
3737
{
38-
"abi": [
39-
{
40-
"inputs": [
41-
{
42-
"internalType": "uint256",
43-
"name": "amount",
44-
"type": "uint256"
45-
}
46-
],
47-
"name": "stake",
48-
"outputs": [],
49-
"stateMutability": "nonpayable",
50-
"type": "function"
51-
},
52-
{
53-
"inputs": [
54-
{
55-
"internalType": "uint256",
56-
"name": "amount",
57-
"type": "uint256"
58-
}
59-
],
60-
"name": "withdraw",
61-
"outputs": [],
62-
"stateMutability": "nonpayable",
63-
"type": "function"
64-
},
65-
{
66-
"inputs": [
67-
{
68-
"internalType": "address",
69-
"name": "user",
70-
"type": "address"
71-
}
72-
],
73-
"name": "getStake",
74-
"outputs": [
75-
{
76-
"internalType": "uint256",
77-
"name": "",
78-
"type": "uint256"
79-
}
80-
],
81-
"stateMutability": "view",
82-
"type": "function"
83-
}
84-
]
38+
"abi": [
39+
{
40+
"inputs": [
41+
{
42+
"internalType": "uint256",
43+
"name": "amount",
44+
"type": "uint256"
45+
}
46+
],
47+
"name": "stake",
48+
"outputs": [],
49+
"stateMutability": "nonpayable",
50+
"type": "function"
51+
},
52+
{
53+
"inputs": [
54+
{
55+
"internalType": "uint256",
56+
"name": "amount",
57+
"type": "uint256"
58+
}
59+
],
60+
"name": "withdraw",
61+
"outputs": [],
62+
"stateMutability": "nonpayable",
63+
"type": "function"
64+
},
65+
{
66+
"inputs": [
67+
{
68+
"internalType": "address",
69+
"name": "user",
70+
"type": "address"
71+
}
72+
],
73+
"name": "getStake",
74+
"outputs": [
75+
{
76+
"internalType": "uint256",
77+
"name": "",
78+
"type": "uint256"
79+
}
80+
],
81+
"stateMutability": "view",
82+
"type": "function"
83+
}
84+
]
8585
}
8686
```
8787

docs/docs/03-sdk/04-methods-reference/_how-to-gas-limit.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -39,53 +39,53 @@ contract StakingContract {
3939

4040
```json
4141
{
42-
"abi": [
43-
{
44-
"inputs": [
45-
{
46-
"internalType": "uint256",
47-
"name": "amount",
48-
"type": "uint256"
49-
}
50-
],
51-
"name": "stake",
52-
"outputs": [],
53-
"stateMutability": "nonpayable",
54-
"type": "function"
55-
},
56-
{
57-
"inputs": [
58-
{
59-
"internalType": "uint256",
60-
"name": "amount",
61-
"type": "uint256"
62-
}
63-
],
64-
"name": "withdraw",
65-
"outputs": [],
66-
"stateMutability": "nonpayable",
67-
"type": "function"
68-
},
69-
{
70-
"inputs": [
71-
{
72-
"internalType": "address",
73-
"name": "user",
74-
"type": "address"
75-
}
76-
],
77-
"name": "getStake",
78-
"outputs": [
79-
{
80-
"internalType": "uint256",
81-
"name": "",
82-
"type": "uint256"
83-
}
84-
],
85-
"stateMutability": "view",
86-
"type": "function"
87-
}
88-
]
42+
"abi": [
43+
{
44+
"inputs": [
45+
{
46+
"internalType": "uint256",
47+
"name": "amount",
48+
"type": "uint256"
49+
}
50+
],
51+
"name": "stake",
52+
"outputs": [],
53+
"stateMutability": "nonpayable",
54+
"type": "function"
55+
},
56+
{
57+
"inputs": [
58+
{
59+
"internalType": "uint256",
60+
"name": "amount",
61+
"type": "uint256"
62+
}
63+
],
64+
"name": "withdraw",
65+
"outputs": [],
66+
"stateMutability": "nonpayable",
67+
"type": "function"
68+
},
69+
{
70+
"inputs": [
71+
{
72+
"internalType": "address",
73+
"name": "user",
74+
"type": "address"
75+
}
76+
],
77+
"name": "getStake",
78+
"outputs": [
79+
{
80+
"internalType": "uint256",
81+
"name": "",
82+
"type": "uint256"
83+
}
84+
],
85+
"stateMutability": "view",
86+
"type": "function"
87+
}
88+
]
8989
}
9090
```
9191

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"label": "General",
3-
"collapsed": false,
4-
"collapsible": false,
5-
"position": 1
2+
"label": "General",
3+
"collapsed": false,
4+
"collapsible": false,
5+
"position": 1
66
}

0 commit comments

Comments
 (0)