Skip to content

Commit

Permalink
feat: add copyable Tenderly links
Browse files Browse the repository at this point in the history
  • Loading branch information
dzimiks committed Aug 2, 2023
1 parent 2d02181 commit 29036d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/Tenderly/tenderly-metamask-snap-simulate-asset-changes.git"
},
"source": {
"shasum": "OXuq1oRKZP51I/dTk9HMvOce1cS9gRkyQXt+lVWpQq4=",
"shasum": "tTMc95nfjRTvxO+PQPmkvg0Ic0IYn9TllCfOkP3/6KA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
9 changes: 5 additions & 4 deletions packages/snap/src/tenderly/formatter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
Component,
copyable,
divider,
heading,
panel,
Expand All @@ -25,10 +26,10 @@ export function formatResponse(
const formatters = makeAddressFormatters(data);

const panelOutputs = [
...formatSimulationUrl(data, credentials),
divider(),
...formatAssetChanges(data),
divider(),
...formatSimulationUrl(data, credentials),
divider(),
...formatBalanceDiff(data, formatters),
divider(),
...formatOutputValue(data, formatters),
Expand Down Expand Up @@ -341,8 +342,8 @@ export function formatSimulationUrl(
text(
`**Status:** ${data.transaction?.status ? 'Success ✅' : 'Failed ❌'}`,
),
text(`**${simulationUrl}**`),
copyable(`${simulationUrl}`),
text('Share simulation details with others! 🤗'),
text(`**${sharedSimulationUrl}**`),
copyable(`${sharedSimulationUrl}`),
];
}
2 changes: 1 addition & 1 deletion packages/snap/src/tenderly/simulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function submitSimulation(
save_if_fails: true,
simulation_type: 'full',
generate_access_list: false,
source: 'metamask-snap',
source: 'tenderly-metamask-snap',
}),
headers: {
'Content-Type': 'application/json',
Expand Down

0 comments on commit 29036d2

Please sign in to comment.