Skip to content

Commit

Permalink
add simulation in proposal view
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 committed Feb 1, 2024
1 parent d5fc559 commit bf4fa46
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/plugins/oSnap/Proposal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ReadOnly from './components/Input/ReadOnly.vue';
import SafeLinkWithAvatar from './components/SafeLinkWithAvatar.vue';
import { GnosisSafe, Transaction } from './types';
import OsnapMarketingWidget from './components/OsnapMarketingWidget.vue';
import TenderlySimulation from './components/TransactionBuilder/TenderlySimulation.vue';
const keyOrder = [
'to',
Expand Down Expand Up @@ -59,9 +60,11 @@ function enrichTransactionForDisplay(transaction: Transaction) {
...commonProperties,
type: 'Contract interaction',
'method name': method.name,
...Object.fromEntries(method.inputs.map((input,i)=>{
return [`${input.name} (param ${i+1}): `,parameters[i]]
}))
...Object.fromEntries(
method.inputs.map((input, i) => {
return [`${input.name} (param ${i + 1}): `, parameters[i]];
})
)
};
}
if (transaction.type === 'transferFunds') {
Expand Down Expand Up @@ -120,6 +123,12 @@ function enrichTransactionForDisplay(transaction: Transaction) {
</ReadOnly>
</div>

<TenderlySimulation
:transactions="safe.transactions"
:safe="safe"
:network="safe.network"
/>

<HandleOutcome
v-if="!!results"
:space="space"
Expand Down

0 comments on commit bf4fa46

Please sign in to comment.