create-sbc-app 0.4.4 → 0.4.5
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/README.md
CHANGED
|
@@ -135,7 +135,7 @@ npx create-sbc-app my-app --template react-dynamic
|
|
|
135
135
|
npx create-sbc-app my-app --template react-para
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
**Supported Chains:** Base Sepolia, Base
|
|
138
|
+
**Supported Chains:** Base Sepolia, Base, Radius Testnet, Radius
|
|
139
139
|
|
|
140
140
|
**Features:**
|
|
141
141
|
- Para wallet integration
|
package/bin/cli.js
CHANGED
|
@@ -105,7 +105,7 @@ Available Chains:
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
// Validate template + chain compatibility
|
|
108
|
-
if (['react-dynamic', 'react-
|
|
108
|
+
if (['react-dynamic', 'react-turnkey'].includes(template) && (chain === 'radiusTestnet' || chain === 'radius')) {
|
|
109
109
|
console.log(`\nError: The ${template} template does not support ${chain}.`);
|
|
110
110
|
console.log('Please use baseSepolia or base chain instead.\n');
|
|
111
111
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
VITE_SBC_API_KEY={{apiKey}}
|
|
3
3
|
# Get your Para API Key at https://developer.getpara.com/
|
|
4
4
|
VITE_PARA_API_KEY=your_para_api_key
|
|
5
|
-
# Supported chains: "baseSepolia" | "base"
|
|
5
|
+
# Supported chains: "baseSepolia" | "base" | "radiusTestnet" | "radius"
|
|
6
6
|
VITE_CHAIN={{chain}}
|
|
7
7
|
VITE_RPC_URL=
|
|
@@ -81,10 +81,14 @@ const permitAbi = [
|
|
|
81
81
|
const chainExplorer = (c: Chain) => {
|
|
82
82
|
if (c.id === baseSepolia.id) return 'https://sepolia.basescan.org';
|
|
83
83
|
if (c.id === base.id) return 'https://basescan.org';
|
|
84
|
-
if (c.id === radiusTestnet.id) return 'https://testnet.radiustech.xyz
|
|
84
|
+
if (c.id === radiusTestnet.id) return 'https://testnet.radiustech.xyz';
|
|
85
|
+
if (c.id === radius.id) return 'https://network.radiustech.xyz';
|
|
85
86
|
return '';
|
|
86
87
|
};
|
|
87
88
|
|
|
89
|
+
const isRadiusChain = (c: Chain) => c.id === radiusTestnet.id || c.id === radius.id;
|
|
90
|
+
const nativeCurrencyLabel = (c: Chain) => isRadiusChain(c) ? 'RUSD' : 'ETH';
|
|
91
|
+
|
|
88
92
|
function SmartAccountInfo({ account, refreshAccount, isLoadingAccount, accountError }: any) {
|
|
89
93
|
const [sbcBalance, setSbcBalance] = useState<string | null>(null);
|
|
90
94
|
useEffect(() => {
|
|
@@ -119,7 +123,7 @@ function SmartAccountInfo({ account, refreshAccount, isLoadingAccount, accountEr
|
|
|
119
123
|
<div className="flex justify-between"><span className="text-purple-700">Smart Account Address:</span><span className="font-mono text-xs text-purple-600 break-all">{account.address}</span></div>
|
|
120
124
|
<div className="flex justify-between"><span className="text-purple-700">Deployed:</span><span className="text-purple-600">{account.isDeployed ? '✅ Yes' : '⏳ On first transaction'}</span></div>
|
|
121
125
|
<div className="flex justify-between"><span className="text-purple-700">Nonce:</span><span className="text-purple-600">{account.nonce}</span></div>
|
|
122
|
-
<div className="flex justify-between"><span className="text-purple-700">
|
|
126
|
+
<div className="flex justify-between"><span className="text-purple-700">{nativeCurrencyLabel(chain)} Balance:</span><span className="text-purple-600 font-mono text-xs">{fmtEth(account.balance)} {nativeCurrencyLabel(chain)}</span></div>
|
|
123
127
|
<div className="flex justify-between"><span className="text-purple-700">{getTokenSymbol(chain)} Balance:</span><span className="text-purple-600 font-mono text-xs">{fmtSbc(sbcBalance)} {getTokenSymbol(chain)}</span></div>
|
|
124
128
|
</div>
|
|
125
129
|
{accountError && <p className="mt-2 text-xs text-red-600">{String(accountError)}</p>}
|