Skip to content
This repository was archived by the owner on Sep 9, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/custom-account/dist/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ wallet.registerAccountMessageHandler(async (origin, req) => {
case 'wallet_signTypedData':
case 'wallet_signTypedData_v3':
case 'wallet_signTypedData_v4':
const result = await prompt(`The site from ${origin} requests you sign this with your offline strategy:\n${JSON.stringify(req)}`)
const result = await prompt({ customHtml: `<div style="width: 100%;overflow-wrap: break-word;">
The site from <span style="font-weight: 900;color: #037DD6;"><a href="${origin}">${origin}</a></span> requests you sign this with your offline strategy:\n${JSON.stringify(req)}
</div>`})
return result
default:
throw rpcErrors.methodNotFound(req)
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-account/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h1>Hello Offline Account!</h1>
method: 'eth_sendTransaction',
params: [{
from: account,
value: '0x100000000000000000',
value: '0x10000000000000',
to: '0x55e2780588aa5000f464f700d2676fd0a22ee160',
}]
})
Expand Down
4 changes: 3 additions & 1 deletion examples/custom-account/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ wallet.registerAccountMessageHandler(async (origin, req) => {
case 'wallet_signTypedData':
case 'wallet_signTypedData_v3':
case 'wallet_signTypedData_v4':
const result = await prompt(`The site from ${origin} requests you sign this with your offline strategy:\n${JSON.stringify(req)}`)
const result = await prompt({ customHtml: `<div style="width: 100%;overflow-wrap: break-word;">
The site from <span style="font-weight: 900;color: #037DD6;"><a href="${origin}">${origin}</a></span> requests you sign this with your offline strategy:\n${JSON.stringify(req)}
</div>`})
return result
default:
throw rpcErrors.methodNotFound(req)
Expand Down