@@ -6,6 +6,7 @@ import { useCopyToClipboard } from "../utils/useCopyToClipboard";
6
6
// SponsoredFeed interface has the same structure as defined in deployment yaml/json files
7
7
interface SponsoredFeed {
8
8
alias : string ; // name of the feed
9
+ account_address ?: string ; // optional, needed only for solana.
9
10
id : string ; // price feed id
10
11
time_difference : number ; // in seconds
11
12
price_deviation : number ;
@@ -117,6 +118,8 @@ export const SponsoredFeedsTable = ({
117
118
) ;
118
119
const defaultParams = paramEntries . length > 0 ? paramEntries [ 0 ] [ 0 ] : "" ;
119
120
121
+ const hasAccountAddress = feeds . some ( ( feed ) => ! ! feed . account_address ) ;
122
+
120
123
return (
121
124
< div className = "my-6" >
122
125
< p className = "mb-3" >
@@ -158,6 +161,11 @@ export const SponsoredFeedsTable = ({
158
161
< th className = "text-left px-3 py-2 font-semibold text-gray-900 dark:text-gray-100 border-b border-gray-200 dark:border-gray-600 min-w-[100px]" >
159
162
Name
160
163
</ th >
164
+ { hasAccountAddress && (
165
+ < th className = "text-left px-3 py-2 font-semibold text-gray-900 dark:text-gray-100 border-b border-gray-200 dark:border-gray-600 min-w-[400px]" >
166
+ Account Address
167
+ </ th >
168
+ ) }
161
169
< th className = "text-left px-3 py-2 font-semibold text-gray-900 dark:text-gray-100 border-b border-gray-200 dark:border-gray-600 min-w-[400px]" >
162
170
Price Feed Id
163
171
</ th >
@@ -181,6 +189,33 @@ export const SponsoredFeedsTable = ({
181
189
{ feed . alias }
182
190
</ span >
183
191
</ td >
192
+ { hasAccountAddress && (
193
+ < td className = "px-3 py-2 align-top" >
194
+ { feed . account_address ? (
195
+ < div className = "flex items-start gap-2" >
196
+ < code className = "text-xs font-mono text-gray-600 dark:text-gray-400 break-all leading-relaxed" >
197
+ { feed . account_address }
198
+ </ code >
199
+ < button
200
+ onClick = { ( ) =>
201
+ feed . account_address &&
202
+ copyToClipboard ( feed . account_address )
203
+ }
204
+ className = "p-1 hover:bg-gray-200 dark:hover:bg-gray-600 rounded flex-shrink-0 mt-0.5"
205
+ title = "Copy Account Address"
206
+ >
207
+ { copiedText === feed . account_address ? (
208
+ < span className = "text-green-500 text-xs font-bold" >
209
+ ✓
210
+ </ span >
211
+ ) : (
212
+ < CopyIcon className = "w-3 h-3 text-gray-400" />
213
+ ) }
214
+ </ button >
215
+ </ div >
216
+ ) : null }
217
+ </ td >
218
+ ) }
184
219
< td className = "px-3 py-2 align-top" >
185
220
< div className = "flex items-start gap-2" >
186
221
< code className = "text-xs font-mono text-gray-600 dark:text-gray-400 flex-1 break-all leading-relaxed" >
0 commit comments