Skip to content

Commit

Permalink
Merge pull request #1517 from DA0-DA0/development
Browse files Browse the repository at this point in the history
Deploy Polytone Authz Exec fix
  • Loading branch information
NoahSaso authored Dec 13, 2023
2 parents 57cff77 + 088724c commit 45aaec3
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ const Component: ActionComponent = (props) => {
className="mb-4"
disabled={!props.isCreating}
fieldName={props.fieldNamePrefix + 'chainId'}
onlyDaoChainIds
/>
)}

Expand Down Expand Up @@ -182,8 +183,9 @@ const Component: ActionComponent = (props) => {

export const makeAuthzExecAction: ActionMaker<AuthzExecData> = ({
t,
address: grantee,
address: mainAddress,
chain: { chain_id: currentChainId },
context,
}) => {
const useDefaults: UseDefaults<AuthzExecData> = () => ({
chainId: currentChainId,
Expand All @@ -209,8 +211,6 @@ export const makeAuthzExecAction: ActionMaker<AuthzExecData> = ({
grantee: {},
msgs: {},
}) ||
// Make sure this address is the grantee.
msg.stargate.value.grantee !== grantee ||
!Array.isArray(msg.stargate.value.msgs)
) {
return { match: false }
Expand Down Expand Up @@ -262,7 +262,11 @@ export const makeAuthzExecAction: ActionMaker<AuthzExecData> = ({
stargate: {
typeUrl: MsgExec.typeUrl,
value: {
grantee,
grantee:
chainId === currentChainId ||
context.type !== ActionContextType.Dao
? mainAddress
: context.info.polytoneProxies[chainId],
msgs: msgs.map((msg) => cwMsgToProtobuf(msg, address)),
} as MsgExec,
},
Expand Down

2 comments on commit 45aaec3

@vercel
Copy link

@vercel vercel bot commented on 45aaec3 Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 45aaec3 Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.