diff --git a/.changeset/gentle-tips-turn.md b/.changeset/gentle-tips-turn.md new file mode 100644 index 000000000000..a5a23296e6ae --- /dev/null +++ b/.changeset/gentle-tips-turn.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/coin-polkadot": minor +--- + +Polkadot network upgrade: sunset of stash/controller feature diff --git a/libs/coin-polkadot/src/deviceTransactionConfig.ts b/libs/coin-polkadot/src/deviceTransactionConfig.ts index aa59ac7b7222..dfab6e0bf0bc 100644 --- a/libs/coin-polkadot/src/deviceTransactionConfig.ts +++ b/libs/coin-polkadot/src/deviceTransactionConfig.ts @@ -49,7 +49,7 @@ function getDeviceTransactionConfig({ transaction: Transaction; status: TransactionStatus; }): Array { - const { mode, recipient, rewardDestination } = transaction; + const { mode, rewardDestination } = transaction; const { amount } = status; const mainAccount = getMainAccount(account, parentAccount) as PolkadotAccount; let fields: { type: string; label: string; value?: string }[] = []; @@ -81,11 +81,6 @@ function getDeviceTransactionConfig({ label: "Staking", value: "Bond", }); - fields.push({ - type: "text", - label: "Controller", - value: recipient, - }); fields.push({ type: "text", label: "Amount", @@ -171,14 +166,6 @@ function getDeviceTransactionConfig({ label: "Staking", value: "Set controller", }); - fields.push({ - type: "text", - label: "Controller", - value: - // NOTE: I added this here as TokenAccount and ChildAccount - // both don't have freshAddress - account.type === "Account" ? account.freshAddress : mainAccount.freshAddress, - }); break; case "claimReward": diff --git a/libs/coin-polkadot/src/js-buildTransaction.ts b/libs/coin-polkadot/src/js-buildTransaction.ts index 8952351aafbd..1e02a10d0002 100644 --- a/libs/coin-polkadot/src/js-buildTransaction.ts +++ b/libs/coin-polkadot/src/js-buildTransaction.ts @@ -36,8 +36,6 @@ const getExtrinsicParams = (a: PolkadotAccount, t: Transaction): ExtrinsicParams pallet: "staking", name: "bond", args: { - // Spec choice: we always set the account as both the stash and its controller - controller: a.freshAddress, value: t.amount.toString(), // The rewards destination. Can be "Stash", "Staked", "Controller" or "{ Account: accountId }"". payee: t.rewardDestination || "Stash", @@ -93,7 +91,7 @@ const getExtrinsicParams = (a: PolkadotAccount, t: Transaction): ExtrinsicParams return { pallet: "staking", name: "setController", - args: { controller: a.freshAddress }, + args: {}, }; case "nominate":